|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-05 11:13 UTC] guessmoor at yahoo dot de
[2013-02-26 22:58 UTC] pollita@php.net
[2013-02-26 22:58 UTC] pollita@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: pollita
[2013-05-18 23:45 UTC] dzenovich@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 UTC |
Description: ------------ I am running php5.2.1 as apache2.2 module It seems that there is a problem with multiple classes in a single file with runkit_import. The reproduce-code throws the following error: Fatal error: Call to undefined method a::foo() When i define 'class c' before 'class a' in the same file, everythings ok. Reproduce code: --------------- #file main.php <?class b { public function foobar() { echo "foobar()\n"; } } class a extends b {} runkit_import( "class_a.php" ); $a = new a(); $a->foobar(); $a->foo();?> #---------------------------------------# #file class_a.php <?class a { public function foo() { echo "foo()\n" } } class c {} # Define class c before class a in this file works. ?> Expected result: ---------------- foobar() foo() Actual result: -------------- foobar() Fatal error: Call to undefined method a::foo() in X:\main.php on line 5