note 24867 added to language.oop.constructor

From: Date: Fri, 30 Aug 2002 17:10:01 +0000
Subject: note 24867 added to language.oop.constructor
Groups: php.notes 
Request: Send a blank email to php-notes+get-36047@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' -- http://www.php.net/manual/en/language.oop.constructor.php http://master.php.net/manage/user-notes.php?action=edit+24867 http://master.php.net/manage/user-notes.php?action=delete+24867 http://master.php.net/manage/user-notes.php?action=reject+24867

« previous php.notes (#36047) next »