summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-04-13 08:23:39 +0000
committerAntony Dovgal <tony2001@php.net>2005-04-13 08:23:39 +0000
commit36d13eb7c9207ff9050a90b72fae9630479c5fc2 (patch)
tree61585ac3eaed2c1afa443596fe403e2e2239130f /ext
parentecf95a1e66436caaa37fd7865ac3e9d346861512 (diff)
downloadphp-git-36d13eb7c9207ff9050a90b72fae9630479c5fc2.tar.gz
add testcase for bug #30833
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/tests/array/bug30833.phpt35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/standard/tests/array/bug30833.phpt b/ext/standard/tests/array/bug30833.phpt
new file mode 100644
index 0000000000..61701a532f
--- /dev/null
+++ b/ext/standard/tests/array/bug30833.phpt
@@ -0,0 +1,35 @@
+--TEST--
+bug #30833 (array_count_values() modifying input array)
+--FILE--
+<?php
+
+$foo = array('abc', '0000');
+var_dump($foo);
+
+$count = array_count_values( $foo );
+var_dump($count);
+
+var_dump($foo);
+
+echo "Done\n";
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(3) "abc"
+ [1]=>
+ string(4) "0000"
+}
+array(2) {
+ ["abc"]=>
+ int(1)
+ [0]=>
+ int(1)
+}
+array(2) {
+ [0]=>
+ string(3) "abc"
+ [1]=>
+ string(4) "0000"
+}
+Done