#29716 [Asn->Bgs]: Critical - conditional class definitions are compiled and produce errors
| From: | helly@php.net | Date: | Tue, 17 Aug 2004 07:18:33 +0000 |
| Subject: | #29716 [Asn->Bgs]: Critical - conditional class definitions are compiled and produce errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64767@lists.php.net to get a copy of this message | ||
ID: 29716
Updated by: helly@php.net
Reported By: alan at akbkhome dot com
-Status: Assigned
+Status: Bogus
Bug Type: Zend Engine 2 problem
-Operating System: all
+Operating System: *
-PHP Version: 5.0.1
+PHP Version: 5.*
Assigned To: helly
New Comment:
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
We no longer support ext/overload (and ext/aggregation). In PHP 5
__autoload was reimplemented as a new different feature even though it
is in some manner meant to be able to replace the old behavior. But it
is meant to do it etter and offer more. Hence unfortunatley those two
are different things and yes we broke BC.
Previous Comments:
------------------------------------------------------------------------
[2004-08-17 08:15:28] derick@php.net
Marcus breaks it, marcus should fix it :)
Also, can you please add a test case for this?
thanks
------------------------------------------------------------------------
[2004-08-17 06:21:19] alan_k@php.net
Relivant change
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?ws=0&r1=1.567&r2=1.567.2.1&ty=u
I suggest testing for > 1, rather than != 2 on call, as that's the only
one who's API changed in PHP4->5
------------------------------------------------------------------------
[2004-08-17 06:01:38] alan at akbkhome dot com
Description:
------------
something changed in 5.0.1 that breaks conditional class definitions.
hence breaking code that worked ok on php4 & php5.0.0
Reproduce code:
---------------
<?php
if (true) { // this is the correct definition. (used for php5)
class Overloaded {
function __call($method,$args) {
}
}
} else { // this is used for php4
class Overloaded {
function __call($method,$args,&$return) {
}
}
}
?>
Expected result:
----------------
nothing
Actual result:
--------------
Content-type: text/html
X-Powered-By: PHP/5.0.1
<br />
<b>Fatal error</b>: Method DB_DataObject_Overload::__call() must take
exactly 2 arguments in <b>/usr/src/php/php-5.0.1/test1.php</b> on line
<b>16</b><br />
a
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29716&edit=1