note 126559 added to language.variables.basics
| From: | anisgazig at gmail dot com | Date: | Fri, 05 Nov 2021 14:04:00 +0000 |
| Subject: | note 126559 added to language.variables.basics | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217143@lists.php.net to get a copy of this message | ||
$this is a special variable so we can not assign it. But before PHP 7.1.0, indirect assignments such
as variable variables are allowed.
$bd = "this";
$$bd = "CountryNickName";
echo $this;//allowed prior to PHP 7.1.0
but from the version of 7.1.0, it was not allowed and throw a fatal error
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 103.120.33.26)
----
Manual Page -- https://php.net/manual/en/language.variables.basics.php
Edit -- https://main.php.net/note/edit/126559
Del: integrated -- https://main.php.net/note/delete/126559/integrated
Del: useless -- https://main.php.net/note/delete/126559/useless
Del: bad code -- https://main.php.net/note/delete/126559/bad+code
Del: spam -- https://main.php.net/note/delete/126559/spam
Del: non-english -- https://main.php.net/note/delete/126559/non-english
Del: in docs -- https://main.php.net/note/delete/126559/in+docs
Del: other reasons-- https://main.php.net/note/delete/126559
Reject -- https://main.php.net/note/reject/126559
Search -- https://main.php.net/manage/user-notes.php