ID: 22253
Comment by: andrew at evilwalrus dot com
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Class/Object related
Operating System: win2k
PHP Version: 4.2.3
New Comment:
According to the comments on the OOP manual page, if a constructor is
not located in the base class, the function of the same name will be
located in subsequent classes, and loaded accordingly. Yes, this is by
design, but no, i personally don't like it... correct me if i'm wrong,
please.
~ Andrew Heebner
Previous Comments:
------------------------------------------------------------------------
[2003-02-17 11:38:10] [EMAIL PROTECTED]
In this example, the printStr() method becomes the constructor of the
printStr class, while I think it should not be working this way... I
hope this is not by design ;)
class String
{
function printStr($string)
{
print $string;
}
}
class printStr extends String {}
$ps = new printStr("abc");
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22253&edit=1