echo getType($value)

PHP
gettype($u)
Source

Also in PHP: