check type of php

PHP
gettype ( mixed $var ) : string

Source

Also in PHP: