ID: 8790
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Description: set global in function

Sorry, it's my mistake.
reset() is required.

Previous Comments:
---------------------------------------------------------------------------

[2001-01-18 13:03:35] [EMAIL PROTECTED]
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:
=======================



---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=8790


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to