PHP Data Types

  • Basic types
    • integer — integer type, represents whole numbers
    • float — floating point, double-precision values, represents all real numbers
    • string — string type, represents strings
    • boolean — boolean, represents true or false
    • array — array, holds multiple data items of the same type
    • object — object, holds an instance of a class; a special type
    • NULL — null, a variable that has not been assigned a value, has been reset, or has been assigned the special value NULL is a variable of the NULL type
    • resource — resource, specific built-in functions (for example database functions) return variables of the resource type; they must be passed as arguments to other functions