#30959 [Opn->Asn]: __call does not return by reference
| From: | sniper@php.net | Date: | Wed, 09 Mar 2005 00:00:32 +0000 |
| Subject: | #30959 [Opn->Asn]: __call does not return by reference | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76908@lists.php.net to get a copy of this message | ||
ID: 30959
Updated by: sniper@php.net
Reported By: joel at zmail dot pt
-Status: Open
+Status: Assigned
Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5.*
+PHP Version: 5CVS-2005-03-09
Assigned To: andi
New Comment:
Andi, is this the final call? :)
(documentation or engine change..that is the question)
Previous Comments:
------------------------------------------------------------------------
[2005-03-08 12:53:29] joel at zmail dot pt
well, then that info about __call and return by reference should go
into the manual, in the __call section.
right?
------------------------------------------------------------------------
[2005-03-08 12:50:23] helly@php.net
At the moment __call() relies on the internal signature which is return
by copy and the fact that the engine prevents from implementing return
by reference functions at c-level.
------------------------------------------------------------------------
[2005-03-08 12:01:42] joel at zmail dot pt
I've just tested with latest php 5 (php5-200503080930)
and the problem is not solved.
------------------------------------------------------------------------
[2005-02-28 21:20:25] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-12-02 12:43:27] joel at zmail dot pt
Description:
------------
__call doesn't return by reference
Reproduce code:
---------------
class A{
private $x = 123;
public function & __call($m,$a){
return $this->x;
}
}
$a = new A();
$x = & $a->UndefMethod();
$x = 789;
$y = & $a->UndefMethod();
Expected result:
----------------
$y should be 789, but it is 123
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30959&edit=1