check type of variable php

PHP
gettype($var);gettype ( mixed $var ) : string
gettype($u)
Source

Also in PHP: