I’m looking at this example array_filter comment and he passes an argument to array_filter as
array_filter($subject, array(new array_ereg("image[0-9]{3}\.png"), 'ereg')
How is it that the callback accepts an array with multiple arguments one of them being the actual callback function
In PHP it is possible to represent a
callableusing an array in the following format.array($object, 'methodName')The documentation itself states:
It is quite common to see this used with the
$thisvariable inside objects.In your example, the first element of the array is created with
new, and is the instantiated object required, anderegis the method.