fork(1) download
  1. <?php
  2.  
  3. function f () {
  4. return array("foo" => "bar");
  5. }
  6.  
  7. function extract_container () {
  8. extract(f());
  9. return $foo;
  10. }
  11.  
  12. echo "Extract: " . extract_container() . "\n";
  13. echo "Current: " . $foo . "\n";
  14. echo "Global: " . $GLOBALS['foo'] . "\n";
  15.  
  16. // your code goes here
Success #stdin #stdout #stderr 0.01s 20568KB
stdin
Standard input is empty
stdout
Extract: bar
Current: 
Global:  
stderr
PHP Notice:  Undefined variable: foo in /home/GemYMJ/prog.php on line 13
PHP Notice:  Undefined index: foo in /home/GemYMJ/prog.php on line 14