| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2001-03-10 00:30 UTC] koyama at hoge dot org
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 14:00:01 2025 UTC | 
If set global variables as global in function, first time works fine, but second wrong. ======================= <?php $hoge = 'hoge'; function a() { while (list($name,) = each( $GLOBALS )) { global $$name; } echo "hoge: $hoge<br>\n"; } a(); a(); a(); ?> ======================= It displays ======================= hoge: hoge hoge: hoge: =======================