Callling callbacks

From: Date: Wed, 21 Apr 2010 15:44:16 +0000
Subject: Callling callbacks
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7181@lists.php.net to get a copy of this message
What is the best way to have a function accept an arbitrary callback (be it a string, array or closure in case of PHP 5.3) that is compatible with PHP 5.2 and 5.3? The code for array_walk and call_user_func is quite different in the two branches. Do I have to include both variants or is there some abstraction that works in both branches? Thanks -- Gustavo Lopes

« previous php.pecl.dev (#7181) next »