Another nice example baked into #PHP why having different return types for the same function is a really bad idea. It just results in way more effort to do things right everywhere this function is used.
@danrot I agree with the sentiment, but in this specific case, you can use `return (array) array_rand($array, limit)` without adding cyclomatic complexity.