gettype(variable);
For instance:
$int = 10;
echo gettype($int)."\n"; // outputs: integer
$str = "PHP";
echo gettype($str)."\n"; // outputs: string
$flt = 1.2;
echo gettype($flt)."\n"; // outputs: double (also called float)
$bool = true;
echo gettype($bool)."\n"; // outputs: boolean
$arr = [1,2,3,4,5,6,7,8,9,10];
echo gettype($arr)."\n"; // outputs: array