3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $grades = array( "PK", "K", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ); function normalizeLexileScore($ability, $grade_level = null) { if( $grade_level == null ) { return $ability; } $grade_level = max(min($grade_level, 9), 2); $gli_cap = array(NULL, NULL, 975, 1070, 1165, 1250, 1300, 1370, 1420, 1500); $normalized = min($ability, $gli_cap[$grade_level]); return $normalized; } foreach ($grades as $grade) { printf("%d, %s\n", normalizeLexileScore(1000, $grade); }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.32
Parse error: syntax error, unexpected ';' in /in/qKjrW on line 36
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ';' in /in/qKjrW on line 36
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/qKjrW on line 36
Process exited with code 255.