|
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-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 10:00:01 2025 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;