#35641 [Opn->Bgs]: not consistent __set method

From: Date: Mon, 12 Dec 2005 06:52:14 +0000
Subject: #35641 [Opn->Bgs]: not consistent __set method
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90263@lists.php.net to get a copy of this message
ID: 35641 Updated by: sniper@php.net Reported By: khad at landak dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: linux 2.6 PHP Version: 5.1.1 New Comment: No. Previous Comments: ------------------------------------------------------------------------ [2005-12-12 04:52:17] khad at landak dot com Description: ------------ in prior 5.1, it is allowed to do: class MyClass { public function __set($key, &$value) {} } $c = new MyClass(); $c->d=10; in 5.1 up: that code result this: Fatal error: Couldn't execute method MyClass::__set in Unknown on line 0 I have submit this bug. My question is, is it possible to assign as reference using setter method ? Reproduce code: --------------- class MyClass { public function __set($key, &$value) {} } $c = new MyClass(); $c->d=10; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35641&edit=1

« previous php.bugs (#90263) next »