Re: BC break with callbacks in 5.3
| From: | Chuck Hagenbuch | Date: | Wed, 30 Jan 2008 17:17:32 +0000 |
| Subject: | Re: BC break with callbacks in 5.3 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35033@lists.php.net to get a copy of this message | ||
Quoting Marcus Boerger <helly@php.net>:
actually it was a bug. We, sorry I, did not spot this in earlier versions. Now saying you rely on a bug in PHP 5 to be able to execute PHP 4 code simply does not work.The bug is that with callbacks in PHP 5.3+, E_STRICT is enforced even when E_STRICT is turned off. See bug #43231 (I've been unable to use PHP 5.3 since November because of this): http://bugs.php.net/bug.php?id=43231 This works fine: class foo { function bar() {
echo 'hi';} } foo::bar(); This throws a warning: call_user_func(array('foo', 'bar')); Both should certainly be E_STRICT errors. The 2nd one should not throw a warning if E_STRICT is off, though. -chuck