#43231 [Opn->Asn]: array-based callback syntax is overly E_STRICT
| From: | jani@php.net | Date: | Fri, 01 Feb 2008 22:56:08 +0000 |
| Subject: | #43231 [Opn->Asn]: array-based callback syntax is overly E_STRICT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121887@lists.php.net to get a copy of this message | ||
ID: 43231
Updated by: jani@php.net
Reported By: chuck at horde dot org
-Status: Open
+Status: Assigned
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.2.*
Assigned To: helly
New Comment:
Wasn't this fixed now..?
Previous Comments:
------------------------------------------------------------------------
[2008-02-01 08:58:15] jochem at mondrian dot nl
I agree that this should be a bug, a lot of applications that try to be
compatible with both php4 and php5 will run into this.
I know everyone should run PHP5, but reality is that many people don't
yet, or can't yet.
------------------------------------------------------------------------
[2008-01-31 16:48:43] mike at theupstairsroom dot com
This is insane. You should not produce an E_STRICT error if E_STRICT is
turned off. This will break a *lot* of existing code...
------------------------------------------------------------------------
[2008-01-31 15:30:16] jason at citydiesel dot net
I also don't understand. It seems to me that this logic will lead to a
lot of unnecessary compatibility issues. If we need the strict behavior
we can always set E_STRICT.
------------------------------------------------------------------------
[2008-01-30 19:25:35] chagenbu@php.net
I'm sorry, I don't understand. Of course it is an E_STRICT error. But
why is it an error if E_STRICT is turned off?
------------------------------------------------------------------------
[2008-01-30 19:20:47] helly@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is indeed the correct behavior. You do not pass in a valid
callback. If you call hello() directly you get an E_STRICT. Now
call_user_func[_array]() tries to bind this function and cannot because
it is not a valid one. It used to work in 5.2 for BC sakes, because I
overlooked this in 5.0. When I first noticed this issue in 5.1, we
couldn't change it in 5.1 and we also decided to not change this in 5.2.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/43231
--
Edit this bug report at http://bugs.php.net/?id=43231&edit=1