check fo rtype of input php

PHP
gettype($u)
Source

Also in PHP: