note 113447 added to language.types.callable

From: Date: Fri, 11 Oct 2013 16:38:28 +0000
Subject: note 113447 added to language.types.callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-196529@lists.php.net to get a copy of this message
For those wondering, it seems that when specifiying a call back in object notation (ie. array($this, "myfunc") ) that the method can be private. Tested in php 5.3: class mc { public function go() { $arr = array(1,2,3,4); array_walk($arr, array($this, "walkIt")); } private function walkIt($val) { echo $val . "<br />"; } } $m = new mc(); $m->go(); Output: 1 2 3 4 ---- Server IP: 69.147.83.199 Probable Submitter: 162.17.136.165 ---- Manual Page -- http://php.net/manual/en/language.types.callable.php Edit -- https://master.php.net/note/edit/113447 Del: integrated -- https://master.php.net/note/delete/113447/integrated Del: useless -- https://master.php.net/note/delete/113447/useless Del: bad code -- https://master.php.net/note/delete/113447/bad+code Del: spam -- https://master.php.net/note/delete/113447/spam Del: non-english -- https://master.php.net/note/delete/113447/non-english Del: in docs -- https://master.php.net/note/delete/113447/in+docs Del: other reasons-- https://master.php.net/note/delete/113447 Reject -- https://master.php.net/note/reject/113447 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196529) next »