I want to do something like this:
class Cls { function fun($php) { return \'The rain in Spain.\'; } } $ar = array(1,2,3); $instance = new Cls(); print_r(
Yes, you can have callbacks to methods, like this:
array_map(array($instance, 'fun'), $ar)
see the callback type in PHP's manual for more info