summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug25708.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/bug25708.phpt')
-rw-r--r--ext/standard/tests/array/bug25708.phpt92
1 files changed, 46 insertions, 46 deletions
diff --git a/ext/standard/tests/array/bug25708.phpt b/ext/standard/tests/array/bug25708.phpt
index ff8b9f4304..0e695b69c9 100644
--- a/ext/standard/tests/array/bug25708.phpt
+++ b/ext/standard/tests/array/bug25708.phpt
@@ -3,55 +3,55 @@ Bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS)
--FILE--
<?php
function foo($ref, $alt) {
- unset($GLOBALS['a']);
- unset($GLOBALS['b']);
- $GLOBALS['a'] = 1;
- $GLOBALS['b'] = 2;
+ unset($GLOBALS['a']);
+ unset($GLOBALS['b']);
+ $GLOBALS['a'] = 1;
+ $GLOBALS['b'] = 2;
- $org_a = $GLOBALS['a'];
- $org_b = $GLOBALS['b'];
+ $org_a = $GLOBALS['a'];
+ $org_b = $GLOBALS['b'];
- if ($ref) {
- global $a, $b;
- } else {
- /* zval temp_var(NULL); // refcount = 1
- * a = temp_var[x] // refcount = 2
- */
- $a = NULL;
- $b = NULL;
- }
+ if ($ref) {
+ global $a, $b;
+ } else {
+ /* zval temp_var(NULL); // refcount = 1
+ * a = temp_var[x] // refcount = 2
+ */
+ $a = NULL;
+ $b = NULL;
+ }
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
- echo "--\n";
- if ($alt) {
- $a = &$GLOBALS['a'];
- $b = &$GLOBALS['b'];
- } else {
- extract($GLOBALS, EXTR_REFS);
- }
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
- echo "--\n";
- $a = &$GLOBALS['a'];
- $b = &$GLOBALS['b'];
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
- echo "--\n";
- $GLOBALS['b'] = 3;
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
- echo "--\n";
- $a = 4;
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
- echo "--\n";
- $c = $b;
- debug_zval_dump($b, $GLOBALS['b'], $c);
- echo "--\n";
- $b = 'x';
- debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b'], $c);
- echo "--\n";
- debug_zval_dump($org_a, $org_b);
- echo "----";
- if ($ref) echo 'r';
- if ($alt) echo 'a';
- echo "\n";
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
+ echo "--\n";
+ if ($alt) {
+ $a = &$GLOBALS['a'];
+ $b = &$GLOBALS['b'];
+ } else {
+ extract($GLOBALS, EXTR_REFS);
+ }
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
+ echo "--\n";
+ $a = &$GLOBALS['a'];
+ $b = &$GLOBALS['b'];
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
+ echo "--\n";
+ $GLOBALS['b'] = 3;
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
+ echo "--\n";
+ $a = 4;
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']);
+ echo "--\n";
+ $c = $b;
+ debug_zval_dump($b, $GLOBALS['b'], $c);
+ echo "--\n";
+ $b = 'x';
+ debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b'], $c);
+ echo "--\n";
+ debug_zval_dump($org_a, $org_b);
+ echo "----";
+ if ($ref) echo 'r';
+ if ($alt) echo 'a';
+ echo "\n";
}
$a = 'ok';