Type Inspectors
Introduction
These functions and classes provide information about
- a variable's duck types or strict types
- a class's parents, traits, and namespace
Click on the function or class below for more details.
Available Classes
Class | Purpose |
---|---|
GetArrayTypes |
returns a list of all strict PHP types for a given array |
GetClassTraits |
returns a list of all traits used by a class or object, its parents, and its traits |
GetClassTypes |
returns a list of all strict PHP types for a given class or interface |
GetDuckTypes |
returns a list of all practical PHP types for a given value or variable |
GetNamespace |
returns a class's or object's namespace |
GetNumericType |
returns which PHP integer or double a given value might be |
GetObjectTypes |
returns a list of all strict PHP types for a given object |
GetPrintableType |
gettype() for error logging / exception messages |
GetStrictTypes |
returns a list of all strict PHP types for a given value or variable |
GetStringDuckTypes |
returns a list of all PHP duck types for a given string |
GetStringTypes |
returns a list of all strict PHP types for a given string |
StripNamespace |
returns a class's or object's classname without the namespace |
Available Functions
Function | Purpose |
---|---|
get_array_types() |
returns a list of all strict PHP types for a given array |
get_class_traits() |
returns a list of all traits used by a class or object, its parents, and its traits |
get_class_types() |
returns a list of all strict PHP types for a given class or interface |
get_duck_types() |
returns a list of all practical PHP types for a given value or variable |
get_namespace() |
returns a class's or object's namespace |
get_numeric_type() |
returns which PHP integer or double a given value might be |
get_object_types() |
returns a list of all strict PHP types for a given object |
get_printable_type() |
gettype() for error logging / exception messages |
get_strict_types() |
returns a list of all strict PHP types for a given value or variable |
get_string_duck_types() |
returns a list of all PHP duck types for a given string |
get_string_types() |
returns a list of all strict PHP types for a given string |
strip_namespace() |
returns a class's or object's classname without the namespace |