note 106351 added to language.oop5.paamayim-nekudotayim

From: Date: Sat, 29 Oct 2011 23:50:14 +0000
Subject: note 106351 added to language.oop5.paamayim-nekudotayim
Groups: php.notes 
Request: Send a blank email to php-notes+get-184225@lists.php.net to get a copy of this message
Tested with PHP 5.3.8 <?php class FirstClass { protected $constructTrace; public function __construct(){ $this->constructTrace[] = "FirstClass::__construct()"; } } class SecondClass extends firstClass { public function __construct(){ parent::__construct(); $this->constructTrace[] = "SecondClass::__construct()"; } } class ThirdClass extends secondClass { public function __construct(){ parent::__construct(); $this->constructTrace[] = "ThirdClass::__construct()"; } } class SomeOtherClass extends thirdClass { public function __construct(){ parent::__construct(); FirstClass::__construct(); $this->constructTrace[] = "SomeOtherClass::__construct()"; } public function showConstructTrace(){ print_r($this->constructTrace); } } $obj = new someOtherClass(); $obj->showConstructTrace(); // Array // ( // [0] => firstClass::__construct() // [1] => secondClass::__construct() // [2] => thirdClass::__construct() // [3] => firstClass::__construct() // [4] => someOtherClass::__construct() // ) ?> ---- Server IP: 69.147.83.197 Probable Submitter: 83.8.23.82 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php Edit -- https://master.php.net/note/edit/106351 Del: integrated -- https://master.php.net/note/delete/106351/integrated Del: useless -- https://master.php.net/note/delete/106351/useless Del: bad code -- https://master.php.net/note/delete/106351/bad+code Del: spam -- https://master.php.net/note/delete/106351/spam Del: non-english -- https://master.php.net/note/delete/106351/non-english Del: in docs -- https://master.php.net/note/delete/106351/in+docs Del: other reasons-- https://master.php.net/note/delete/106351 Reject -- https://master.php.net/note/reject/106351 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184225) next »