3v4l.org

run code in 300+ PHP versions simultaneously
<?php function 3lettermonth($item){ return strlen($item) == 3; } $months = array('jan', 'feb', 'mar', 'apr'); array_push($months,'may'); $output = array_filter($months, 3lettermonth($item) ); print_r($output);
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected '3' (T_LNUMBER), expecting identifier (T_STRING) or '(' in oZe4v on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or '(' in oZe4v on line 3
Process exited with code 255.

preferences:
169.54 ms | 1386 KiB | 41 Q