Req #53356 [Opn->Csd]: Allow use function return value in write context
Edit report at https://bugs.php.net/bug.php?id=53356&edit=1
ID: 53356
Updated by: tyrael@php.net
Reported by: lifinsky at yandex dot ru
Summary: Allow use function return value in write context
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: 5.3.3
-Assigned To:
+Assigned To: tyrael
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
this will be supported in php7 as you can see here: http://3v4l.org/lCOIR
Previous Comments:
------------------------------------------------------------------------
[2010-11-19 15:50:18] lifinsky at yandex dot ru
Description:
------------
Allow use function return value in write context if this function return value by reference (Such as
c or c++)
Test script:
---------------
function &test() {
static $a = 0;
return $a;
}
print(++test());
print(++test());
print(++test());
Expected result:
----------------
123
Actual result:
--------------
Fatal error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53356&edit=1
Thread (4 messages)