check type of object in php

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

Also in PHP: