From: hagen at cookfast dot net Operating system: PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug description: passing by reference in variable-length argument lists
Description: ------------ In my opinion it should be possible to pass by reference when using variable-length argument lists. I know that there are quite a lot of workarounds for this but none of them is really appealing to me. For the sake of orthogonality it should be possible to use user defined functions with variable-length argument lists in the same way as without. See my listing for a possible use of this. Do not tell me these variables could be packed into an array. This feature request does not contain scope inheritance as requested in bug #11472. Reproduce code: --------------- // We've got some strings from user input // named $a, $b and $c // and want them to be escaped and converted somehow // with passing by reference this could look like my_conversion($a,$b,$c); // possible workaround now: list($a,$b,$c) = my_conversion($a,$b,$c) -- Edit bug report at http://bugs.php.net/?id=31441&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31441&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31441&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31441&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31441&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31441&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31441&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31441&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31441&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31441&r=support Expected behavior: http://bugs.php.net/fix.php?id=31441&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31441&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31441&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31441&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31441&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31441&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31441&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31441&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31441&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31441&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31441&r=mysqlcfg