From:             zhundiak at comcast dot net
Operating system: NA - linux/windows
PHP version:      5.0.0b2 (beta2)
PHP Bug Type:     Zend Engine 2 problem
Bug description:  Cannot directly return references

Description:
------------
A function cannot directly return a reference produced by another function
without first assigning it to a tmp variable.
This is a specialization of bug 24687.  

Reproduce code:
---------------
function &getSomeReference()
{
  return getSomeOtherReference(); // Fails
}
function &getSomeReference()
{
  $tmp =& getSomeOtherReference(); // Works
  return $tmp;
}


Expected result:
----------------
It should work.

Actual result:
--------------
Fatal error: Only variables or references can be returned by reference


-- 
Edit bug report at http://bugs.php.net/?id=26439&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26439&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26439&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26439&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26439&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26439&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26439&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26439&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26439&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26439&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26439&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26439&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26439&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26439&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26439&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26439&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26439&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26439&r=float

Reply via email to