note 24867 deleted from language.oop.constructor by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 30 Aug 2002 18:07:55 +0000 |
| Subject: | note 24867 deleted from language.oop.constructor by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36053@lists.php.net to get a copy of this message | ||
class A {
function A() {
echo 'I am A';
}
}
class B extends A {
}
$b = new B;
// $b now contains two functions:
// 1. A() - as expected.
// 2. A clone of A() called B() - which now gets called as the constructor of B
// ...so program outputs: 'I am A'