check type of result php

PHP
gettype($u)
Source

Also in PHP: