🐘 PHP
Beginner
What are PHP data types?
Answer
PHP supports eight primitive data types. Scalar types: int (whole numbers), float (decimal numbers), string (sequence of characters), bool (true or false). Compound types: array (ordered map that can hold multiple values of any type), object (instance of a class). Special types: null (variable has no value), resource (reference to an external resource like a file handle or database connection). PHP is a loosely typed (dynamically typed) language — a variable can hold any type and can change type during execution, though PHP 7+ added strict type declarations.
Previous
What is the difference between echo and print in PHP?
Next
What is the difference between == and === in PHP?