3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>A BASIC HTML FORM</title> <?php $G==0 If ($answer==1){ $G=$G+10; } If ($answer2==2){ $G=$G+10; } If ($answer3==3){ $G=$G+10; } If ($answer4==4){ $G=$G+10; } If ($answer5==5){ $G=$G+10; } If ($answer6==6){ $G=$G+10; } If ($answer7==7){ $G=$G+10; } If ($answer8==8){ $G=$G+10; } If ($answer9==9){ $G=$G+10; } If ($answer10==10){ $G=$G+10; } ?> </head> <body> <h3>Basic maths and medical quiz</h3> <?php if ($answer==1 && $answer2==2 && $answer3==3 && $answer4==4 && $answer5==5 && $answer6==6 && $answer7==7 && $answer8==8 && $answer9==9 && $answer10==10) { print ("Well Done 100%"); } else { print ("You got {$G} %"); } echo "Jamie"; ?> <form name="quiz" METHOD="GET ACTION="basicForm.php"> 1. Patient Z who is taking antibiotics attends your clinic with a part used course of tablets. <br> You examine the contents of the packet and there are 12 tablets remaining. <br> The dispensing label states that 28 tablets were dispensed for the complete course. The tablets are prescribed as ONE tablet four times a day.<br> How many days of the course have been taken by the patient <ul style="margin-top: 1pt"> <li><input type="text" name="answer" value="answer"/></li> </ul> 2. Drug C is available in 100mg/2ml ampoules. The patient requires a 75mg intramuscular single dose. What volume of injection is required to administer the dose. <ul style="margin-top: 1pt"> <li><input type="text" name="answer2" value="answer"/></li> </ul> 3. You calculate the dose of a drug to administer to a patient. Your final calculation is 1.491ml. Rounding this number to one decimal place, how many mls of this drug will you administer. <ul style="margin-top: 1pt"> <li><input type="text" name="answer3" value="answer"/></li> </ul> 4. Drug X is to be administered at 25mg/kg. What dose would you prescribe for a patient who weighs 22kg? <ul style="margin-top: 1pt"> <li><input type="text" name="answer4" value="answer"/></li> </ul> 5. An injection is available in a concentration of 500mg/2ml.<br> The patient requires a dose of 175mg. What volume would you draw up to inject? <ul style="margin-top: 1pt"> <li><input type="text" name="answer5" value="answer"/></li> </ul> 6. A new inhaler contains 200 actuations. Patient A is working abroad for 12 weeks.<br> His normal dose is two puffs twice a day. How many inhalers will he need for the duration of his trip <ul style="margin-top: 1pt"> <li><input type="text" name="answer6" value="answer"/></li> </ul> 7. Drug Y is available as 500mg/2ml ampoules. An infant weighing 6kg is prescribed 100mg/kg of this drug daily in four divided doses.<br> How much do you require in mg for each dose. <ul style="margin-top: 1pt"> <li><input type="text" name="answer7" value="answer"/></li> </ul> 8. Drug A is prescribed at one tablet twice a day and costs £28.00 for a 28 tablet pack. what is the cost of drug A for this 28 day course/ <ul style="margin-top: 1pt"> <li><input type="text" name="answer8" value="answer"/></li> </ul> 9. Drug M is available as a 250mg/5ml suspension. What volume of suspension would you require for a 10 day course for your patient if the dose is 2.5ml four times a day. <ul style="margin-top: 1pt"> <li><input type="text" name="answer9" value="answer"/></li> </ul> 10. A patient is prescribed 24 tablets of drug X and is advised to take ONE tablet twice a day. How many days will the medication last. <ul style="margin-top: 1pt"> <li><input type="text" name="answer10" value="answer"/></li> </ul> <input type="submit" name="submit1" value="Submit"> </form> </body> </html>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.5.80.0100.05017.20
5.5.70.0100.07317.27
5.5.60.0100.07717.19
5.5.50.0130.06717.20
5.5.40.0070.07717.16
5.5.30.0130.07317.23
5.5.20.0070.07717.23
5.5.10.0170.04317.32
5.5.00.0070.07017.26
5.4.240.0100.03719.09
5.4.230.0030.05319.09
5.4.220.0070.07718.98
5.4.210.0170.06319.12
5.4.200.0100.07719.09
5.4.190.0170.06719.16
5.4.180.0070.07019.26
5.4.170.0070.06319.09
5.4.160.0100.07719.03
5.4.150.0170.06719.00
5.4.140.0030.07716.41
5.4.130.0070.07716.43
5.4.120.0070.06016.57
5.4.110.0130.04316.43
5.4.100.0100.05016.47
5.4.90.0100.06716.47
5.4.80.0000.05016.33
5.4.70.0070.05316.39
5.4.60.0130.02716.21
5.4.50.0030.03716.40
5.4.40.0100.04016.50
5.4.30.0000.03716.31
5.4.20.0100.07316.35
5.4.10.0100.07016.38
5.4.00.0130.06315.84
5.3.280.0070.05314.56
5.3.270.0070.08314.57
5.3.260.0170.06714.46
5.3.250.0030.06714.53
5.3.240.0000.08714.52
5.3.230.0000.08714.43
5.3.220.0030.07714.37
5.3.210.0100.07714.54
5.3.200.0170.05014.64
5.3.190.0100.08014.51
5.3.180.0100.04014.39
5.3.170.0070.07314.55
5.3.160.0000.04714.50
5.3.150.0030.05014.42
5.3.140.0070.06314.50
5.3.130.0000.05014.38
5.3.120.0070.07014.37
5.3.110.0030.08714.41
5.3.100.0230.06314.11
5.3.90.0070.04713.93
5.3.80.0100.07013.77
5.3.70.0070.07713.94
5.3.60.0070.03313.91
5.3.50.0030.04013.86
5.3.40.0000.05313.91
5.3.30.0070.04013.84
5.3.20.0030.04313.64
5.3.10.0100.03313.41
5.3.00.0030.03713.49

preferences:
134.95 ms | 1394 KiB | 7 Q