class xxx extends a_class_from_the_include_path - problem

From: Date: Sat, 10 Nov 2001 18:24:36 +0000
Subject: class xxx extends a_class_from_the_include_path - problem
Groups: php.dev php.general 
Request: Send a blank email to php-dev+get-70005@lists.php.net to get a copy of this message
i have the following script: <?php require_once("PEAR.php"); class super extends PEAR { function setup() { print("i am super<br>"); } } class super1 extends super { function setup() { print("i am super1<br>"); parent::setup(); } } class super2 extends super1 { function setup() { print("i am super2<br>"); parent::setup(); } } $s2 = new super2; $s2->setup(); ?> it prints i am super2 i am super1 i am super1 i am super1 i am super1 i am super1 .... and so on if class super _doesnt_ extend PEAR the expected output is printed i am super2 i am super1 i am super i was looking for the error in PEAR.php but even if i empty the file and leave _only_ "class PEAR { } " in there it still does the unexpected, i can extend any class from the include_path, they all have this effect ... strange so it's _not_ PEAR's fault, is this a php-bug? i am using 4.0.5 and 6 -- Wolfram

« previous php.dev (#70005) next »