|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-25 07:31 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 13 02:00:02 2026 UTC |
ex: <?php function &foo(&$v) { return $v; } class Cl { var $a=5; } $x=&new Cl(); print_r($x); $x=&foo($x); print_r($x); ?> outputs: cl Object ( [a] => 5 ) cl Object ( ) but if we change $x=&foo($x); print_r($x); to $y=&foo($x); print_r($y); everything works fine;