The function [is_array()](<http://php.net/manual/en/function.is-array.php>) returns true if a variable is an array.

$integer = 1337;
$array = [1337, 42];

is_array($integer); // false
is_array($array); // true

You can type hint the array type in a function to enforce a parameter type; passing anything else will result in a fatal error.

function foo (array $array) { /* $array is an array */ }

You can also use the [gettype()](<http://php.net/manual/en/function.gettype.php>) function.

$integer = 1337;
$array = [1337, 42];

gettype($integer) === 'array'; // false
gettype($array) === 'array'; // true