Найдите тип PHP
gettype($u)
tsnl_incredible
gettype($u)
gettype ( mixed $var ) : string
$variableType = gettype($variable);