check if variable is type php code example Example: check type in php gettype ( mixed $var ) : string