ID: 20242 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Verified +Status: Wont fix Bug Type: Zend Engine 2 problem PHP Version: 4CVS-2002-11-04 New Comment:
I'll make it a no fix since the last discussions with Zeev and Andi suggest so. Previous Comments: ------------------------------------------------------------------------ [2003-02-15 09:43:25] [EMAIL PROTECTED] yes this works with ZE1 completely, but still fails with ZE2... any news on this? sorry if this isnt the rite place... its just been awhile since the last comment. ------------------------------------------------------------------------ [2002-11-04 10:59:34] [EMAIL PROTECTED] This is indeed a ZE2 bug. It appears that unlike ZE1, ZE2 does not allow the class defenition to be made AFTER the calls to the class are made. This of course is not a good way to do things, class defenitions should occur before the class is being used. However, since this worked in ZE1, it probably should work in ZE2 as well. ------------------------------------------------------------------------ [2002-11-04 06:45:44] [EMAIL PROTECTED] Ups i rechecked it and now it works for ZE 1.3 maybe i missconfigured the test for ZE1. But it still fails for ZE2. I guess i should commit the test then. ------------------------------------------------------------------------ [2002-11-04 06:25:39] [EMAIL PROTECTED] Huh? It just works for me. Hmm I'm rather interested in what causes it to fail in your environment. ------------------------------------------------------------------------ [2002-11-04 05:17:21] [EMAIL PROTECTED] While you can call functions in front or after current code you cannot do so with classes. As this is documented nowhere this is an error with both ZE1 and ZE2. Following .phpt file: ==================================== --TEST-- Method call infront of class definition --FILE-- <?php test::show_static(); $t = new test; $t->show_method(); class test { function show_static() { echo "static\n"; } function show_method() { echo "method\n"; } } ?> --EXPECT-- static method =EOF================================ Produces following .out ==================================== <font color=ff0000> Fatal error: Class 'test' not found in /usr/src/php4-HEAD/tests/classes/classes001.php on line 3 </font>/usr/src/php4-HEAD/tests/classes/classes001.php(3) : Fatal error - Class 'test' not found =EOF================================ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20242&edit=1