Annotation of embedaddon/php/ext/standard/tests/array/array_count_values2.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: basic array_count_values test
        !             3: --FILE--
        !             4: <?php
        !             5: $array1 = array(1, 
        !             6:                                "hello", 
        !             7:                                1, 
        !             8:                                "world", 
        !             9:                                "hello", 
        !            10:                                "", 
        !            11:                                "rabbit", 
        !            12:                                "foo", 
        !            13:                                "Foo", 
        !            14:                                TRUE, 
        !            15:                                FALSE, 
        !            16:                                NULL, 
        !            17:                                0);
        !            18: var_dump(array_count_values($array1));
        !            19: ?>
        !            20: --EXPECTF--
        !            21: Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
        !            22: 
        !            23: Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
        !            24: 
        !            25: Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
        !            26: array(8) {
        !            27:   [1]=>
        !            28:   int(2)
        !            29:   ["hello"]=>
        !            30:   int(2)
        !            31:   ["world"]=>
        !            32:   int(1)
        !            33:   [""]=>
        !            34:   int(1)
        !            35:   ["rabbit"]=>
        !            36:   int(1)
        !            37:   ["foo"]=>
        !            38:   int(1)
        !            39:   ["Foo"]=>
        !            40:   int(1)
        !            41:   [0]=>
        !            42:   int(1)
        !            43: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>