| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2003-03-30 23:08 UTC] tim dot stebbing at nunatak dot com dot au
 optionaly add 'as' to the global keyword, in the same way that SQL 'as' works: global $aVeryLongVariableName as $foo It would neaten alot of code, would not break old scripts, I imagine your passing a ref into the code block, this is just specifying the handle used :) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 01:00:02 2025 UTC | 
The general consensus seems to be that this feature will not be added. A simple workaround which you can implement in your code to achieve the 'neatening up' you're going for is: function bar() { global $aVeryLongVariableName; $foo = &$aVeryLongVariableName; /* This will successfully increment the value of $aVeryLongVariableName */ $foo++; }