ID: 40436
Updated by: [EMAIL PROTECTED]
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