check datatype of variable in php

PHP
gettype ( mixed $var ) : string

Source

Also in PHP: