note 58109 added to language.oop5.overloading

From: Date: Mon, 24 Oct 2005 18:14:24 +0000
Subject: note 58109 added to language.oop5.overloading
Groups: php.notes 
Request: Send a blank email to php-notes+get-97526@lists.php.net to get a copy of this message
Small examle showing how to work with magic method __call and parameters, that u want to pass as a reference. DOES NOT WORK: <?php class a { public function __call($m,&$p) { $p[0]=2; } } $a= new a(); $b=1; $a->foo($b); echo $b; // RETURNS 1 ?> WORKS: <?php class a { public function __call($m,$p) { $p[0]=2; } } $a= new a(); $b=1; $a->foo(&$b); // RETURNS 2 echo $b; ?> ---- Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58109 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58109&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58109&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97526) next »