check gettype is string php

PHP
gettype($u)
Source

Also in PHP: