← All built-ins / gettype()
gettype()
gettype(mixed $number): string
Parameters
| Name | Type | Description |
|---|---|---|
| $v | mixed | value to inspect |
Return value
Type name string: "int", "float", "string", "bool", "array", "null".
Example
echo gettype(1), " ", gettype(1.5), " ", gettype("x"), " ", gettype(true), " ", gettype([]), " ", gettype(null);int float string bool array null