> On Dec 3, 2025, at 12:03 AM, Larry Garfield <[email protected]> wrote:
> 
> $filtered = array_filter($arr, is Point(x: <10));

Btw, it looks incorrect and short closure is preferable here
array_filter($arr, fn($x) => $x is Point())

Or if it works with DFA
array_filter($arr, ? is Point())

If your example illustrated a pattern as an argument I think it’s not valid 
case, because a pattern is something after “is”? The point, enumerated types or 
values. And “is” here is an action/function/intention to match left and right 
operands. 

But kotlin style is perfectly matched here

array_filter($arr, { $it is Point() })


-- 
Best regards, 
Dmitrii Derepko. 
@xepozz

Reply via email to