check data type in php

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

Also in PHP: