3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Intialize the input $score=rand(50,100); //Determine the Grade function p($a,$b) { echo $a . " >= " . $b; return $a>=$b; } $grade=(p($score,90))?'A':( p($score,80)?'B':( p($score,70)?'C':( p($score,60)?'D':'F'))); //Output the Results echo "<h1>A score of $score = $grade</h1>";

preferences:
28.11 ms | 402 KiB | 5 Q