3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<html> <head> <title> Average</title> </head> <body> <?php $fname=$_REQUEST["fname"]; $lname=$_REQUEST["lname"]; $test1=$_REQUEST["test1"]; $test2=$_REQUEST["test2"]; $test3=$_REQUEST["test3"]; //test information $avg = average($test1, $test2, $test3); $lg = lettergrade($avg); fname(); lname(); $test1 = test1($avg); $test2 = test2($avg); $test3 = test3($avg); avg(); function fname() {print "First Name:"; print $fname; print "<br>"; print "<br>"; } function lname() {print "Last Name:"; print "<br>"; print "<br>"; } function test1() {print "Test 1"; print "<br>"; print "<br>"; } function test2() {print "Test 2"; print "<br>"; print "<br>"; } function test3() {print "Test 3"; print "<br>"; print "<br>"; } function avg() {print "Average Grade"; print "<br>"; print "<br>"; } function average($test1,$test2,$test3) { $avg = ($test1 + $test2 + $test3) / 3; return $avg; } function lettergrade($avg) { if ($avg >= 90) $lettergrade = "A"; if ($avg >= 80 && $avg <= 89) $lettergrade = "B"; if ($avg >= 70 && $avg <= 79) $lettergrade = "C"; if ($avg >= 60 && $avg <= 69) $lettergrade = "D"; if ($avg >= 50 && $avg <= 59) $lettergrade = "F"; return $lettergrade; } </body> </html
based on 5JlYO

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page