echo type php

PHP
gettype($u)
Source

Also in PHP: