diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-11-23 06:21:30 -0800 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-11-25 02:50:20 +0100 |
commit | 8b52a8edbe6822c4d36b31ef54126e67231c2519 (patch) | |
tree | c6a33813f743e1864d3a7e9e98b86863c80ccafc | |
parent | bb5a0ad363f8efbd01a366f49b5bfa9f732f2303 (diff) | |
download | php-git-8b52a8edbe6822c4d36b31ef54126e67231c2519.tar.gz |
Add test for bug (count on symbol table)
I should have do this ....
-rw-r--r-- | ext/standard/tests/array/count_symbol_table.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/standard/tests/array/count_symbol_table.phpt b/ext/standard/tests/array/count_symbol_table.phpt new file mode 100644 index 0000000000..b7e0a2e8b1 --- /dev/null +++ b/ext/standard/tests/array/count_symbol_table.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test count() function : count on symbol table +--FILE-- +<?php + +$c1 = 0; +$c2 = 0; +$a = 1; +$b = 1; +$c1 = count($GLOBALS); +unset($a); +unset($GLOBALS["b"]); +$c2 = count($GLOBALS); + +var_dump($c1 - $c2); +$c = 1; +$c1 = count($GLOBALS); +var_dump($c1 - $c2); +?> +--EXPECT-- +int(2) +int(1) |