From: gahgneh+php at gmail dot com
Operating system: Windows XP SP3
PHP version: 5.2.12
PHP Bug Type: Variables related
Bug description: func_get_args() should be able to pass variables as reference
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; }
--
Edit bug report at http://bugs.php.net/?id=50748&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50748&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50748&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50748&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50748&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50748&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50748&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50748&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50748&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50748&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50748&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50748&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50748&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50748&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50748&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50748&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50748&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50748&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50748&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50748&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50748&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50748&r=mysqlcfg