From:             [EMAIL PROTECTED]
Operating system: SunOS 5.7
PHP version:      4.0.4pl1
PHP Bug Type:     Compile Failure
Bug description:  anormal behavior of keyword parent

the use of the parent keyword when the inherited class is in a different file from the 
parent class produces an error:
(just by  writing both classes on a single file avoids the problem)

Fatal error: No parent class available in this context in file_of_inherited_class.php


file: a.php
class a {
        function f() {
                echo "a::f()" ;

file: b.php
class b extends a {
        function f() {
                echo parent::f() ;      // <---- error when compiling 
                echo "b::f()" ;

$obj = new b() ;

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to