RE: [PHP-DEV] class xxx extends a_class_from_the_include_path - problem
| From: | Chris Newbill | Date: | Sat, 10 Nov 2001 18:35:10 +0000 |
| Subject: | RE: [PHP-DEV] class xxx extends a_class_from_the_include_path - problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70009@lists.php.net to get a copy of this message | ||
Works just fine with 4.2.0-dev. However I can verify it on 4.0.6, so I'm
guessing this problem was fixed.
-Chris
-----Original Message-----
From: Wolfram Kriesing [mailto:lists@kriesing.de]
Sent: Saturday, November 10, 2001 11:25 AM
To: list; list
Subject: [PHP-DEV] class xxx extends a_class_from_the_include_path -
problem
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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
For additional commands, e-mail: php-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net