note 124884 added to language.oop5.visibility

From: Date: Sun, 05 Apr 2020 10:31:16 +0000
Subject: note 124884 added to language.oop5.visibility
Groups: php.notes 
Request: Send a blank email to php-notes+get-214420@lists.php.net to get a copy of this message
I have simplified the last method (Example #4) showing how to call private function outside the class. I think this is an idea of that example: <?php class Test { private $foo; private function bar() { echo 'Accessed the private method.'; } public function baz() { // Calling the private method: $this->bar(); } } $test=new Test(); $test->baz(); $test->bar(); ?> ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.195 (proxied: 188.69.192.235) ---- Manual Page -- http://php.net/manual/en/language.oop5.visibility.php Edit -- https://master.php.net/note/edit/124884 Del: integrated -- https://master.php.net/note/delete/124884/integrated Del: useless -- https://master.php.net/note/delete/124884/useless Del: bad code -- https://master.php.net/note/delete/124884/bad+code Del: spam -- https://master.php.net/note/delete/124884/spam Del: non-english -- https://master.php.net/note/delete/124884/non-english Del: in docs -- https://master.php.net/note/delete/124884/in+docs Del: other reasons-- https://master.php.net/note/delete/124884 Reject -- https://master.php.net/note/reject/124884 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214420) next »