PHP doesn't allow you to pass functions and classes as arguments.
You can. Here's my code as an example:
https://github.com/gigablah/fsphinxphp/blob/master/src/FSphi...
Note the $getter parameter.
https://github.com/gigablah/fsphinxphp/blob/master/src/FSphi...
Note the $getter parameter.
What prevents you from doing that in PHP?