note 127527 added to language.namespaces.global

From: Date: Wed, 24 Aug 2022 12:18:21 +0000
Subject: note 127527 added to language.namespaces.global
Groups: php.notes 
Request: Send a blank email to php-notes+get-219466@lists.php.net to get a copy of this message
Note that variables aren't part of the namespace so they are always global (or scoped to function, etc.) and can't be accessed the same way as other namespace stuff. So no: namespace Foo; $var = "hello"; echo \Foo\$var; ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.175 (proxied: 83.55.100.86) ---- Manual Page -- https://php.net/manual/en/language.namespaces.global.php Edit -- https://main.php.net/note/edit/127527 Del: integrated -- https://main.php.net/note/delete/127527/integrated Del: useless -- https://main.php.net/note/delete/127527/useless Del: bad code -- https://main.php.net/note/delete/127527/bad+code Del: spam -- https://main.php.net/note/delete/127527/spam Del: non-english -- https://main.php.net/note/delete/127527/non-english Del: in docs -- https://main.php.net/note/delete/127527/in+docs Del: other reasons-- https://main.php.net/note/delete/127527 Reject -- https://main.php.net/note/reject/127527 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219466) next »