extract_variation11.phpt 331 B

12345678910111213
  1. --TEST--
  2. Test extract() function - ensure EXTR_REFS works when array is referenced and keys clash with variables in current scope.
  3. --FILE--
  4. <?php
  5. $a = array('foo' => 'original.foo');
  6. $ref = &$a;
  7. $foo = 'test';
  8. extract($a, EXTR_OVERWRITE|EXTR_REFS);
  9. $foo = 'changed.foo';
  10. var_dump($a['foo']);
  11. ?>
  12. --EXPECT--
  13. string(11) "changed.foo"