|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-10-21 19:24 UTC] sniper@php.net
[2001-11-11 06:11 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 20:00:01 2025 UTC |
test1.php contains : <?php class a { function MyFunct($i, $j, $k='defaut_k') { echo " in a "; } } ?> test2.php contains <?php include("test1.php"); class b extends a { function MyFunct($i, $j, $k='defaut_k') { echo " in b "; parent::MyFunct($i,$j,$k); // does not work // got : Fatal error: No parent class available in this context in ... a::MyFunct($i,$j,$k); // works } } whereas first example presented here works fine for me : http://www.php.net/manual/en/keyword.parent.php