note 24441 added to keyword.extends

From: Date: Fri, 16 Aug 2002 02:37:15 +0000
Subject: note 24441 added to keyword.extends
Groups: php.notes 
Request: Send a blank email to php-notes+get-35119@lists.php.net to get a copy of this message
class a { function samename(){ echo 'a'; } } class b extends a{ function samename(){ echo 'b'; } function b(){ a::samename(); b::samename(); } } $test_obj = new b(); Quiet confusing though, as this prints out 'ab'. No need to create a new instance of a, therefor both methods still exists with same name. -- http://www.php.net/manual/en/keyword.extends.php http://master.php.net/manage/user-notes.php?action=edit+24441 http://master.php.net/manage/user-notes.php?action=delete+24441 http://master.php.net/manage/user-notes.php?action=reject+24441

« previous php.notes (#35119) next »