|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-04 06:25 UTC] moriyoshi@php.net
[2002-11-04 06:45 UTC] marcus dot boerger at post dot rwth-aachen dot de
[2002-11-04 10:59 UTC] iliaa@php.net
[2003-02-15 09:43 UTC] admin at trevorj dot com
[2003-02-15 09:49 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Feb 12 16:00:01 2026 UTC |
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================================