note 107080 added to language.variables.basics

From: Date: Thu, 05 Jan 2012 16:44:42 +0000
Subject: note 107080 added to language.variables.basics
Groups: php.notes 
Request: Send a blank email to php-notes+get-185375@lists.php.net to get a copy of this message
"Note: $this is a special variable that can't be assigned." While the PHP runtime generates an error if you directly assign $this in code, it doesn't for $$name when name is 'this'. <?php $this = 'text'; // error $name = 'this'; $$name = 'text'; // sets $this to 'text' ?> ---- Server IP: 66.207.199.35 Probable Submitter: 206.47.126.34 ---- Manual Page -- http://www.php.net/manual/en/language.variables.basics.php Edit -- https://master.php.net/note/edit/107080 Del: integrated -- https://master.php.net/note/delete/107080/integrated Del: useless -- https://master.php.net/note/delete/107080/useless Del: bad code -- https://master.php.net/note/delete/107080/bad+code Del: spam -- https://master.php.net/note/delete/107080/spam Del: non-english -- https://master.php.net/note/delete/107080/non-english Del: in docs -- https://master.php.net/note/delete/107080/in+docs Del: other reasons-- https://master.php.net/note/delete/107080 Reject -- https://master.php.net/note/reject/107080 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185375) next »