note 103967 added to language.oop5.visibility

From: Date: Sat, 14 May 2011 08:53:21 +0000
Subject: note 103967 added to language.oop5.visibility
Groups: php.notes 
Request: Send a blank email to php-notes+get-179713@lists.php.net to get a copy of this message
In response to ryan dot m dot lange at gmail dot com. The output of $child2->foo() and $child2->bar() is not strange. $child2->foo() outputs nothing because private property $foo of class Parent is never set since Parents contructor isn't called. $child2->bar() does not output the contents $foo in class Parent. It rather output the contents of a (new) property $foo in class ChildClass2. If adding a parent::__construct() to ChildClass2 constructor, result would perhaps be more obvious. ---- Server IP: 69.147.83.197 Probable Submitter: 77.218.205.22 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.visibility.php Edit -- https://master.php.net/note/edit/103967 Del: integrated -- https://master.php.net/note/delete/103967/integrated Del: useless -- https://master.php.net/note/delete/103967/useless Del: bad code -- https://master.php.net/note/delete/103967/bad+code Del: spam -- https://master.php.net/note/delete/103967/spam Del: non-english -- https://master.php.net/note/delete/103967/non-english Del: in docs -- https://master.php.net/note/delete/103967/in+docs Del: other reasons-- https://master.php.net/note/delete/103967 Reject -- https://master.php.net/note/reject/103967 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179713) next »