3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = preArray ( [0] => Array ( [reg] => Kerala [reg_id] => 7 [amt] => 0 [enquiry] => 13 [package_count] => 0 ) [1] => Array ( [reg] => Karnataka [reg_id] => 14 [amt] => 37217 [enquiry] => 2 [package_count] => 1 ) [2] => Array ( [reg] => Kerala [reg_id] => 7 [amt] => 0 [enquiry] => 13 [package_count] => 0 ) [3] => Array ( [reg] => Srilanka [reg_id] => 50 [amt] => 63307 [enquiry] => 0 [package_count] => 1 ) [4] => Array ( [reg] => Kerala [reg_id] => 7 [amt] => 0 [enquiry] => 13 [package_count] => 0 ) [5] => Array ( [reg] => Hong Kong [reg_id] => 54 [amt] => 250058 [enquiry] => 50 [package_count] => 2 ) ); $colors = array_count_values(array_column($arr, enquiry)); print_r($colors);
based on RUGQ9
Output for 7.0.0
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/b2deZ on line 4
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/b2deZ on line 4
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/b2deZ on line 4
Process exited with code 255.