I'd rather use the logically correct way of
code:
if vartype($var) & 8192

which checks whether the bit equaling 8192 is set or not, thus indicating whether $var is an array or not.
_________________________
There are two types of vessels, submarines and targets.