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