mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
debug_zval_dump() currently prints refcount 1 for interned strings and arrays, which does not really reflect the truth. These values are not refcounted, so the refcount is misleading. Instead print an "interned" tag. Closes GH-6598.
24 lines
358 B
PHP
24 lines
358 B
PHP
--TEST--
|
|
Test extract() for overwrite of GLOBALS
|
|
--FILE--
|
|
<?php
|
|
$str = "John";
|
|
var_dump($GLOBALS["str"]);
|
|
|
|
/* Extracting Global Variables */
|
|
$splat = array("foo" => "bar");
|
|
var_dump(extract(array("GLOBALS" => $splat, EXTR_OVERWRITE)));
|
|
|
|
unset ($splat);
|
|
|
|
var_dump($GLOBALS["str"]);
|
|
|
|
echo "\nDone";
|
|
?>
|
|
--EXPECT--
|
|
string(4) "John"
|
|
int(1)
|
|
string(4) "John"
|
|
|
|
Done
|