PHP function calls have quite some overhead

Apparently $array === (array) $array is significantly faster than is_array($array) for very small arrays. I have posted a detailed benchmark script which seems to concur: for approximately 40-50 bytes, like an array containing 5-6 integers (I am on 64 bit) or 5-6 of 8 byte strings this tricky is definitely faster. For anything larger, the function call overhead seems to be smaller than the variable copy, cast, identity comparison time.