|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-14 11:16 UTC] johannes@php.net
[2010-01-14 11:36 UTC] gahgneh+php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 19:00:01 2025 UTC |
Description: ------------ func_get_args() should be able to pass variables as reference Reproduce code: --------------- function ref(){ $args = func_get_args(); $args[0] = 10; $args[1] = 11; } $value = 0; $value2 = 1; ref($value, $value2); echo $value,$value2; // prints 01 Expected result: ---------------- $value to contain "int 10" and $value2 to contain "int 11" There should be a * pointer operator like C++, to tell the variable to behave like function ref(int* p = null){ *p = 10; }