summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-23 06:22:11 -0800
committerXinchen Hui <laruence@gmail.com>2015-11-23 06:22:11 -0800
commit26f3710ae81c4dc9fb9a2e4965d17b1a985b8c8f (patch)
tree71e20dbe8d6a711cfa53857b548808edfd5909d1
parent8c22edc5467333ddabe4320bdcaec5fb253ccdaf (diff)
parent801e46d8c0a869d60e0af9aa0909d6df2cfc7958 (diff)
downloadphp-git-26f3710ae81c4dc9fb9a2e4965d17b1a985b8c8f.tar.gz
Merge branch 'PHP-7.0'
-rw-r--r--ext/standard/tests/array/count_symbol_table.phpt22
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)