run code in 150+ php & hhvm versions
Bugs & Features
<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>
Output for 5.4.0 - 5.5.8
Parse error: syntax error, unexpected 'If' (T_IF) in /in/f4aXi on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_IF in /in/f4aXi on line 9
Process exited with code 255.