#43163 [Opn]: $this with variable variable

From: Date: Wed, 31 Oct 2007 16:32:38 +0000
Subject: #43163 [Opn]: $this with variable variable
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-185@lists.php.net to get a copy of this message
ID: 43163 Updated by: johannes@php.net Reported By: felipensp at gmail dot com Status: Open -Bug Type: Scripting Engine problem +Bug Type: Documentation problem Operating System: Linux PHP Version: 5.3CVS-2007-10-31 (snap) New Comment: As of PHP 5 $this is a very special variable, I couldn't find anything in the docs about it's limitations, so I mark it as a doc bug. Related to the original report: I'm also not seeing a hint that you can't assign any value to $this in the docs (not even outside a class) Previous Comments: ------------------------------------------------------------------------ [2007-10-31 16:10:53] felipensp at gmail dot com Description: ------------ Variable $this doens't recognize as variable variable. Reproduce code: --------------- $a = 'this'; $$a->b; Expected result: ---------------- Fatal error: Using $this when not in object context Actual result: -------------- Notice: Undefined variable: this ... Notice: Trying to get property of non-object ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43163&edit=1

« previous php.doc.bugs (#185) next »