xref: /PHP-5.6/ext/standard/tests/array/bug30833.phpt (revision 8c09e1ca)
1--TEST--
2Bug #30833 (array_count_values() modifies input array)
3--FILE--
4<?php
5
6$foo = array('abc', '0000');
7var_dump($foo);
8
9$count = array_count_values( $foo );
10var_dump($count);
11
12var_dump($foo);
13
14echo "Done\n";
15?>
16--EXPECT--
17array(2) {
18  [0]=>
19  string(3) "abc"
20  [1]=>
21  string(4) "0000"
22}
23array(2) {
24  ["abc"]=>
25  int(1)
26  ["0000"]=>
27  int(1)
28}
29array(2) {
30  [0]=>
31  string(3) "abc"
32  [1]=>
33  string(4) "0000"
34}
35Done
36