note 53386 added to language.oop5.decon

From: Date: Tue, 31 May 2005 07:59:31 +0000
Subject: note 53386 added to language.oop5.decon
Groups: php.notes 
Request: Send a blank email to php-notes+get-89667@lists.php.net to get a copy of this message
Well: class A { public function __construct() { //do something } } class B extends A { protected function __construct() { parent::__construct(); } } You can't make this becouse B::__construct() MUST have the same visibility or a weaker visibility of A::__construct() !!??!! SO I THINK it's better class A { public function A() { //do something } } class B extends A { protected function B() { parent::A(); } } Because it works. Instead of what they're saying ;) ---- Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53386 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53386&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53386&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53386&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53386&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53386&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53386&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89667) next »