3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_count_values(array( 'ZERO' => 0, 'STR' => 'str', 'ZERO_STR' => '0', 'FALSE' => false, 'EMPTY_STR' => '', 'TRUE' => true, 'ONE' => 1, 'ONE_STR' => '1', )));
Output for 7.0.0 - 7.1.0
Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 4 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 4 array(4) { [0]=> int(2) ["str"]=> int(1) [""]=> int(1) [1]=> int(2) }
Output for hhvm-3.10.0 - 3.12.0
Warning: Can only count STRING and INTEGER values! in /in/0CS22 on line 12 Warning: Can only count STRING and INTEGER values! in /in/0CS22 on line 12 array(4) { [0]=> int(2) ["str"]=> int(1) [""]=> int(1) [1]=> int(2) }
Output for 4.3.2 - 4.4.9, 5.0.2 - 5.6.23
Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 12 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 12 array(4) { [0]=> int(2) ["str"]=> int(1) [""]=> int(1) [1]=> int(2) }
Output for 5.0.0 - 5.0.1
Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 12 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/0CS22 on line 12 array(6) { [0]=> int(1) ["str"]=> int(1) ["0"]=> int(1) [""]=> int(1) [1]=> int(1) ["1"]=> int(1) }
Output for 4.3.0 - 4.3.1
Warning: array_count_values() [http://www.php.net/function.array-count-values]: Can only count STRING and INTEGER values! in /in/0CS22 on line 12 Warning: array_count_values() [http://www.php.net/function.array-count-values]: Can only count STRING and INTEGER values! in /in/0CS22 on line 12 array(4) { [0]=> int(2) ["str"]=> int(1) [""]=> int(1) [1]=> int(2) }