Data Types
PHP has three elemental types of data: integers, floating-point numbers, and strings of text. Integers are sometimes referred to as whole or natural numbers; they contain no decimal point. Floating-point numbers are sometimes called real numbers. They always contain a decimal point, even when only a zero follows it. PHP refers to these as doubles, which is short for double-precision floating-point numbers. Strings are collections of textual data. String constants are always surrounded by double quotes (") or single quotes (').
In addition to these, PHP has four aggregate data types that use the other three: arrays, objects and booleans, and resources. An array is a collection of values associated with indexes. Arrays are discussed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access