#27659 [Opn->WFx]: Cannot re-assign $this

From: Date: Tue, 23 Mar 2004 18:38:14 +0000
Subject: #27659 [Opn->WFx]: Cannot re-assign $this
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56682@lists.php.net to get a copy of this message
 ID:               27659
 Updated by:       pollita@php.net
 Reported By:      js at enradia dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Unknown/Other Function
 Operating System: linux 2.6.3
 PHP Version:      5.0.0RC1
 New Comment:

This "feature" was undocumented in PHP4 and was never intended to work.
 


Previous Comments:
------------------------------------------------------------------------

[2004-03-23 13:09:12] js at enradia dot com

Description:
------------
When trying to reassign $this (from session data for 
example) I get an error: 
Fatal error: Cannot re-assign $this in... 
 
Code used: 
$this = unserialize($data); 
 
This works in php 4. Perhaps this is a feature change but 
I could not find a reference to any alternatives so I am 
submitting a bug just in case. 
 
Thanks! 
Joshua 

Reproduce code:
---------------
$this = unserialize($data);

Expected result:
----------------
Assignment of session or serialized data to $this object 

Actual result:
--------------
Fatal error: Cannot re-assign $this in... 
 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27659&edit=1


Thread (12 messages)

« previous php.bugs (#56682) next »