[PHP-NOTES] note 130648 added to language.variables.scope

[email protected] ("[email protected]") Wed, 11 Feb 2026 18:26:24 +0000
Newsgroups php.notes
Message-ID <[email protected]>
Superglobal scope of class static properties, at the risk of stating the obvious.

<?php
class Alfa {
    public static $superglobal = 'visible everywhere';
}

function demoGlobal( ) {
    echo 'Alfa::$superglobal '.Alfa::$superglobal;
}

demoGlobal();   // outputs Alfa::$superglobal visible everywhere
?>
----
Server IP: 206.189.2.9
Probable Submitter: 2001:56a:fcbd:9a00:31cd:1471:5773:9892
----
Manual Page -- https://php.net/manual/en/language.variables.scope.php
Edit        -- https://main.php.net/note/edit/130648
Del: integrated  -- https://main.php.net/note/delete/130648/integrated
Del: useless     -- https://main.php.net/note/delete/130648/useless
Del: bad code    -- https://main.php.net/note/delete/130648/bad+code
Del: spam        -- https://main.php.net/note/delete/130648/spam
Del: non-english -- https://main.php.net/note/delete/130648/non-english
Del: in docs     -- https://main.php.net/note/delete/130648/in+docs
Del: other reasons-- https://main.php.net/note/delete/130648
Reject      -- https://main.php.net/note/reject/130648
Search      -- https://main.php.net/manage/user-notes.php