Term
Data type
Meaning
A data type is the kind of value a variable holds, which decides what you can do with it. The PHP manual lists null, bool, int, float, string, array, object, callable and resource as built-in types. PHP is dynamically typed, so by default the type is decided at run time from the value, although optional type declarations can make functions stricter. Types matter most in comparisons, where a loose check converts values first and a strict check compares both value and type. See also: Variable, Array, and the guide PHP Variables, Data Types and Control Flow for Beginners.