how to check the type of variable in php code example Example: check type in php gettype ( mixed $var ) : string