From: hack988 at gmail dot com Operating system: Windows 2003 SP2 PHP version: 6SVN-2009-08-24 (snap) PHP Bug Type: Scripting Engine problem Bug description: Deprecated: Call-time pass-by-reference for non-object?
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 bug report at http://bugs.php.net/?id=49343&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49343&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49343&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49343&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49343&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49343&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49343&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49343&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49343&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49343&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49343&r=support Expected behavior: http://bugs.php.net/fix.php?id=49343&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49343&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49343&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49343&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49343&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49343&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49343&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49343&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49343&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49343&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49343&r=mysqlcfg