by habibur · 1y ago · 0 comments
I believe they have solved this problem by now. Though no idea how.
function($x) { return array_key_exists('needle', $x); }
Or using the arrow function syntax: fn($x) => array_key_exists('needle', $x)
The same trick also helps when you need to use functions with mandatory extra parameters, functions with pass-by-value parameters, etc.