3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array ( 0 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 1 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 2 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 3 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), ); $acount = array_count_values($a); print_r(array_keys($acount)); var_export(array_keys($acount));
based on lmLVT
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: array_count_values(): Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Array ( ) array ( )
Output for hhvm-3.10.0 - 3.12.0
Warning: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Array ( ) array ( )
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/1Dg4c on line 50 Warning: array_count_values() [http://www.php.net/function.array-count-values]: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: array_count_values() [http://www.php.net/function.array-count-values]: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Warning: array_count_values() [http://www.php.net/function.array-count-values]: Can only count STRING and INTEGER values! in /in/1Dg4c on line 50 Array ( ) array ( )