note 21409 added to ref.classobj
| From: | mail at cyfactory dot de | Date: | Sat, 11 May 2002 23:09:11 +0000 |
| Subject: | note 21409 added to ref.classobj | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30489@lists.php.net to get a copy of this message | ||
Inheritance Bug!
class a{
function b(){ new b(); }
}
class b{
}
calling
bad = new b();
makes endless loop everytime.
by inheriting method b from a, class b somehow "inherits" its constructor. this is of
course never really wanted and for this not possible in java for example...
--
http://www.php.net/manual/en/ref.classobj.php
http://master.php.net/manage/user-notes.php?action=edit+21409
http://master.php.net/manage/user-notes.php?action=delete+21409
http://master.php.net/manage/user-notes.php?action=reject+21409