|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-02-15 14:42 UTC] thomas at koch dot ro
[2008-02-16 17:58 UTC] johannes@php.net
[2008-02-16 17:58 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 12:00:01 2025 UTC |
Description: ------------ func_get_args() and func_get_arg() should return variables by reference. Reproduce code: --------------- <?php $one = 'one'; $two = 'two'; $three = 'three'; function change_one_into_two_normal(&$var) { $var = 'two'; } function change_one_into_two_using_get_args() { $args = func_get_args(); $args[0] = 'two'; } change_one_into_two_normal($one); echo $one; $one = 'one'; change_one_into_two_using_get_args($one); echo $one; Expected result: ---------------- two one Actual result: -------------- two two