#49343 [Opn->Bgs]: Deprecated: Call-time pass-by-reference for non-object?

From: Date: Mon, 24 Aug 2009 08:58:44 +0000
Subject: #49343 [Opn->Bgs]: Deprecated: Call-time pass-by-reference for non-object?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141416@lists.php.net to get a copy of this message
ID: 49343 Updated by: derick@php.net Reported By: hack988 at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 2003 SP2 PHP Version: 6SVN-2009-08-24 (snap) New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2009-08-24 06:17:54] hack988 at gmail dot com Description: ------------ Call-time pass-by-reference for non-object Variables is Deprecated? We can use word "new" with Call-time pass-by-value for object,but how to use pass-by-reference in Call-time for non-object Variables like int,string,array? Reproduce code: --------------- $a=1; $b=$a; $c=&$a; $a='cc'; tt($c); echo $b."<BR/>"; echo $c."<BR/>"; echo "pass by value"."<BR/>"; tt(&$c); echo $b."<BR/>"; echo $c; function tt($aa){ $aa="erety"; } Expected result: ---------------- Deprecated: Call-time pass-by-reference has been deprecated in F:\Programming\Web\php\mykernel\test\arg\fun_ref_time.php on line 11 1 cc pass by value 1 eretyPHP Deprecated: Call-time pass-by-reference has been deprecated in F:\Programming\Web\php\mykernel\test\arg\fun_ref_time.php on line 11 Actual result: -------------- how can i used Call-time pass-by-value for non-object Variables ? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49343&edit=1

« previous php.bugs (#141416) next »