FAQ

[PECL-DEV] Callling callbacks

Stanislav Malyshev
Apr 21, 2010 at 8:23 pm
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
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›