#40436 [Opn->Fbk]: object references broken in 5.2.1
| From: | tony2001@php.net | Date: | Sun, 11 Feb 2007 09:17:51 +0000 |
| Subject: | #40436 [Opn->Fbk]: object references broken in 5.2.1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-108690@lists.php.net to get a copy of this message | ||
ID: 40436
Updated by: tony2001@php.net
Reported By: Jason at V7Studios dot com
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Windows
PHP Version: 5.2.1
New Comment:
Use var_dump() instead of print; set display_errors=On,
error_reporting=E_ALL; make sure you've removed old php5ts.dll; look
into your web-servers log.
Previous Comments:
------------------------------------------------------------------------
[2007-02-11 07:50:13] Jason at V7Studios dot com
Description:
------------
A certain object reference situation that my code depends on has been
broken in 5.2.1 on *windows*. It works on my linux production server
running 5.2.1.
Thanks.
Reproduce code:
---------------
class Foo
{
private $params = array();
function __set($name, $value){
$this->params[$name] = $value;
}
function &__get($name){
return $this->params[$name];
}
}
$foo = new Foo();
$ref =& $foo->bar;
$ref = "This is a test";
print($foo->bar);
Expected result:
----------------
It should print out "This is a test"
Actual result:
--------------
On windows, nothing is printed out. $foo->bar is not set.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40436&edit=1