note 17494 added to keyword.extends

From: Date: Tue, 11 Dec 2001 16:31:03 +0000
Subject: note 17494 added to keyword.extends
Groups: php.notes 
Request: Send a blank email to php-notes+get-22506@lists.php.net to get a copy of this message
To Clarify the above statement,<B> if the class B that extends class A does not have a constuctor function (i.e. a function named B), then the constructor function of A will be used instead, you don't need to make a constructor in B just to call the constructor of A. <p> For example:<BR> class A<BR> { <Br> function A() { <br> echo "HEY! I'm A!\n"; <BR> } <BR>} <BR>class B extends A { <BR>} <BR> <BR>$b = new B(); <p> produces the output: <Br>HEY! I'm A! -- http://www.php.net/manual/en/keyword.extends.php http://master.php.net/manage/user-notes.php?action=edit+17494 http://master.php.net/manage/user-notes.php?action=delete+17494 http://master.php.net/manage/user-notes.php?action=reject+17494

« previous php.notes (#22506) next »