3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php GetNilaiHuruf(0); public static function GetNilaiHuruf($nilai) { if($nilai > 4) { $nilai = (float) ((float)($nilai) / (float)(100.0) * (float)4.0); } switch($nilai) { case ($nilai > 3.66 && $nilai <= 4) : return "A"; break; case ($nilai > 3.33 && $nilai <= 3.66) : return "A-"; break; case ($nilai > 3.00 && $nilai <= 3.33) : return 'B+'; break; case ($nilai > 2.66 && $nilai <= 3.00) : return 'B'; break; case ($nilai > 2.33 && $nilai <= 2.66) : return 'B-'; break; case ($nilai > 2.00 && $nilai <= 2.33) : return 'C+'; break; case ($nilai > 1.66 && $nilai <= 2.00) : return 'C'; break; case ($nilai > 1.33 && $nilai <= 1.66) : return 'C-'; break; case ($nilai > 1.00 && $nilai <= 1.33) : return 'D+'; break; case ($nilai >= 0.00 && $nilai <= 1.00) : return 'D'; break; } } ?>
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/3v4mH on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_PUBLIC in /in/3v4mH on line 4
Process exited with code 255.