1--TEST--
2Test extract() for overwrite of GLOBALS
3--FILE--
4<?php
5$str = "John";
6debug_zval_dump($GLOBALS["str"]);
7
8/* Extracting Global Variables */
9$splat = array("foo" => "bar");
10var_dump(extract(array("GLOBALS" => $splat, EXTR_OVERWRITE)));
11
12unset ($splat);
13
14debug_zval_dump($GLOBALS["str"]);
15
16echo "\nDone";
17?>
18
19--EXPECTF--
20string(4) "John" refcount(%d)
21int(0)
22string(4) "John" refcount(%d)
23
24Done