ID: 20242 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem PHP Version: 4CVS-2002-11-04 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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