|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-02-15 14:25 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 10 11:00:02 2025 UTC |
Description: ------------ THIS IS MY FIRST REPORT! PLEASE DON'T BANG ME! I'd like to use func_get_args to manipulate variables sent by reference. I encountered this problem(?) by evaluating ezcSignalSlot[1]. There you find: $parameters = array_slice( func_get_args(), 1 ); call_user_func_array( $callback, $parameters ); It would be fine, if I could use the combination of this methods to pipe references to normal variables. [1] http://ezcomponents.org/docs/tutorials/SignalSlot Reproduce code: --------------- function test( ) { $args =& func_get_args(); $args[0]++; } $i=1; test( &$i ); echo $i; Expected result: ---------------- 2 Actual result: -------------- 1