The function gettype() will check the type of variable and return the type as string. You should not use this function to check types on production servers as it may change in the future development of PHP.
$args = array( new stdClass, array(), 'Hello World', 582.65, 574, false, null, true ); foreach ($args as $type) echo gettype($type).'<br />';
The result
object
array
string
double
integer
boolean
NULL
boolean
array
string
double
integer
boolean
NULL
boolean
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)


» Latest comments