Re: Callling callbacks
| From: | Stanislav Malyshev | Date: | Wed, 21 Apr 2010 20:23:10 +0000 |
| Subject: | Re: Callling callbacks | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-7182@lists.php.net to get a copy of this message | ||
Hi!
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?In 5.3+, you should use "f" parameter character. Unfortunately, in 5.2 there was none, so you'd probably have to have different code in 5.2 branch. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com