ID: 13882 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Scripting Engine problem Operating System: Windows PHP Version: 4.0.6 New Comment:
Works fine here with latest CVS. Try the latest dev build from: http://www.php4win.com/ --Jani Previous Comments: ------------------------------------------------------------------------ [2001-10-31 04:28:22] [EMAIL PROTECTED] Code: -- ClassA.php contents ---------------------------------- <?php class A { function Test() { echo "A::Test\n"; } } ?> -- Test.php contents ------------------------------------ <?php include_once('ClassA.php'); class B extends A { function Test() { parent::Test(); } } B::Test(); ?> --------------------------------------------------------- Try to execute Test.php - for example, type php.exe -q Test.php - i recieved application error message on this. The problem seems to be in a buggy parent resove algorithm. On such a cases it incorrectly resolves parent - to class itself (it results in infinite recursion) or raises an exception ("the memory coudn`t be read"). This problem can be "solved" by using real parent`s class name except "parent::", or by doing all such includes "on the same level" -- if some class is included (by include, require, include_once, require_once), all their child classes must be included before the line where parent is included. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13882&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]