3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $employees = array( 1 => array( 'name' => 'Jason Alipala', 'employee_id' => 'G1001-05', 'position' => 1 ), 2 => array( 'name' => 'Bryann Revina', 'employee_id' => 'G1009-03', 'position' => 2 ), 3 => array( 'name' => 'Jeniel Mangahis', 'employee_id' => 'G1009-04', 'position' => 2 ), 4 => array( 'name' => 'Arjay Bussala', 'employee_id' => 'G1009-05', 'position' => 3 ), 5 => array( 'name' => 'Ronnel Ines', 'employee_id' => 'G1002-06', 'position' => 3 ) ); print_r(array_count_values(array_map(function($v){return $v['position'];}$employees)));
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '$employees' (T_VARIABLE), expecting ',' or ')' in /in/5vTNq on line 31
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected '$employees' (T_VARIABLE) in /in/5vTNq on line 31
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/5vTNq on line 31
Process exited with code 255.