3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once('config.php'); // page title $pagetitle="Results - ".$sitename; require_once('login.php'); $totalmarks = '50'; $passingmarks = '18'; $totalpassing = '33'; // total passing percentage ?> <!DOCTYPE html> <html> <head> <title><?=$pagetitle?></title> <script> function printpage() { window.print() } </script> </head> <body style="text-align:center"> <?php if($_GET['id']){ $id=mysql_real_escape_string($_GET['id']); $uq=mysql_query("SELECT * FROM $tbl_name WHERE id='$id'") or die("ERROR"); $u=mysql_fetch_array($uq); $user_name=$u['user_name']; $rq=mysql_query("SELECT * FROM $tbl2 WHERE user='$user_name'") or die("Error fetching result"); ?> <div class="content2" style="center;width:780px"> <div style="text-align:center;margin-bottom:20px;overflow:hidden"> <a style="float:right;" href="#" onClick="printpage()">Print</a> <a href="/" ><img style="width: 500px;height: 130px;" src="images/logo-main.png" alt="logo" title="The Lahore Institute" /></a> <hr/> </div> <div> <div style="font-weight:bold;text-align:center;margin-bottom:10px;"> Roll No: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?=$u['id']?><br/> Name: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=$u['fullname']?><br/> </div> <table width="450" border="0" align="center" cellpadding="1" cellspacing="0" style="border:1px solid #666;border-radius:10px;"> <tr bgcolor="#003063"> <td style="padding:5px;"><strong style="color:#fff">Name of Paper </strong></td> <td style="padding:5px;"><div style="color:#fff" align="center"><strong>Marks Obtained</strong></div></td> <td style="padding:5px;"><div style="color:#fff" align="center"><strong>Total Marks</strong></div></td> <td style="padding:5px;"><div style="color:#fff" align="center"><strong>Status</strong></div></td> </tr> <?php while($r=mysql_fetch_array($rq)){ $i='0'; $i++; if($_SESSION['allmarks']){ $_SESSION['allmarks']=$_SESSION['allmarks']+$r['marks']; } else { $_SESSION['allmarks']=$r['marks']; } echo "<tr>"; if($r['marks']<$passingmarks){ $status='Fail'; } echo '<td style="padding:5px;" align="left">'.$r['subject'].'</td>'; echo '<td style="padding:5px;"><div align="center"><em><strong>'.$r['marks'].'</strong></em></div></td>'; echo '<td style="padding:5px;"><div align="center">'.$totalmarks.'</div></td>'; echo '<td style="padding:5px;"><div align="center">'.$status.'</div></td>'; echo "</tr>"; ?> <?php } $totalall=$i*$totalmarks; $totallgained=$_SESSION['allmarks']; if($totallgained*100/$totallall<$totalpassing){ $fstatus='Failed'; } else { $fstatus='Passed'; } if($fstatus!=='Failed'){ $comments=$passingcomments; } else { $comments=$failingcomments; } ?> </table> <div style="margin-top:10px;text-align:center;font-weight:bold;">Total Marks: <?=$totalgained?><br/>Final Status: <?=$fstatus?><br/>Comments: <?=$comments?><br/></div> </div> </div> </body> </html> <?php } else { require_once('header.php'); ?> <div class="content2"> <h2>Get Result</h2><hr/> <div style="text-align:center"> <span style="color:#F00">*</span> &nbsp; Enter your Roll number and click GET to get your result<br /> <br /> <br /> <form action="result.php" method="get"> <input type="text" name="id" id="id" placeholder="Enter Roll No." size="35" /><br /> <br /> <input style="width: 100px;" type="submit" name="Submit" value="GET" /> </form> </div> </div> <?php require_once('footer.php'); } ?>

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)
8.3.60.0090.00618.67
8.3.50.0080.00621.20
8.3.40.0030.01518.81
8.3.30.0110.00418.79
8.3.20.0080.00018.88
8.3.10.0000.00819.20
8.3.00.0040.00421.89
8.2.180.0060.01516.88
8.2.170.0140.00022.96
8.2.160.0090.00621.13
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0000.00819.23
8.2.110.0060.00322.11
8.2.100.0040.00818.03
8.2.90.0080.00019.07
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0030.00619.75
8.2.20.0020.00517.66
8.2.10.0040.00417.87
8.2.00.0000.00717.86
8.1.270.0070.00023.99
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.47
8.1.230.0070.00420.88
8.1.220.0040.00418.77
8.1.210.0040.00419.03
8.1.200.0030.00617.35
8.1.190.0030.00517.53
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0040.00418.82
8.1.150.0050.00318.63
8.1.140.0040.00417.38
8.1.130.0070.00017.74
8.1.120.0040.00417.44
8.1.110.0070.00317.44
8.1.100.0050.00317.50
8.1.90.0040.00417.41
8.1.80.0040.00417.48
8.1.70.0040.00417.43
8.1.60.0080.00017.52
8.1.50.0000.00817.58
8.1.40.0050.00217.52
8.1.30.0040.00417.66
8.1.20.0040.00417.68
8.1.10.0020.00517.54
8.1.00.0030.00717.50
8.0.300.0040.00420.15
8.0.290.0030.00617.30
8.0.280.0030.00318.44
8.0.270.0000.00717.31
8.0.260.0030.00316.91
8.0.250.0000.00817.17
8.0.240.0030.00617.02
8.0.230.0000.00617.06
8.0.220.0030.00316.94
8.0.210.0040.00417.09
8.0.200.0040.00417.08
8.0.190.0040.00417.08
8.0.180.0000.00817.15
8.0.170.0080.00016.96
8.0.160.0040.00417.09
8.0.150.0080.00017.04
8.0.140.0040.00416.94
8.0.130.0000.00613.50
8.0.120.0000.00717.04
8.0.110.0000.00817.10
8.0.100.0000.00717.05
8.0.90.0000.00817.00
8.0.80.0080.00816.98
8.0.70.0070.00017.14
8.0.60.0000.01016.90
8.0.50.0050.00316.92
8.0.30.0110.00917.22
8.0.20.0100.00917.40
8.0.10.0040.00416.95
8.0.00.0110.00816.76
7.4.330.0000.00614.77
7.4.320.0070.00016.68
7.4.300.0000.00716.66
7.4.290.0000.00716.49
7.4.280.0040.00416.70
7.4.270.0000.00716.51
7.4.260.0050.00013.34
7.4.250.0040.00416.50
7.4.240.0030.00316.67
7.4.230.0070.00016.63
7.4.220.0090.00916.52
7.4.210.0110.00516.62
7.4.200.0020.00516.54
7.4.190.0000.01016.59
7.4.160.0040.01216.61
7.4.150.0100.01317.40
7.4.140.0140.00417.86
7.4.130.0080.00916.65
7.4.120.0110.00916.58
7.4.110.0070.01016.38
7.4.100.0100.00716.57
7.4.90.0090.00916.47
7.4.80.0140.00719.37
7.4.70.0080.01516.61
7.4.60.0160.00916.41
7.4.50.0030.00616.51
7.4.40.0030.01322.27
7.4.30.0120.00616.63
7.4.00.0110.00514.88
7.3.330.0050.00013.29
7.3.320.0000.00513.16
7.3.310.0080.00016.27
7.3.300.0020.00516.10
7.3.290.0090.00616.27
7.3.280.0080.00816.33
7.3.270.0090.00917.40
7.3.260.0080.00818.24
7.3.250.0080.01016.40
7.3.240.0130.00316.42
7.3.230.0040.01316.39
7.3.210.0150.00616.41
7.3.200.0030.02019.39
7.3.190.0070.01016.47
7.3.180.0000.01716.35
7.3.170.0100.01016.49
7.3.160.0090.00616.36
7.3.120.0080.01014.85
7.3.110.0000.01215.09
7.3.100.0030.01415.07
7.3.90.0030.00714.72
7.3.80.0000.01114.60
7.3.70.0090.00614.87
7.3.60.0070.00714.74
7.3.50.0100.00714.68
7.3.40.0000.01314.86
7.3.30.0100.00314.84
7.3.20.0090.00316.36
7.3.10.0080.00816.40
7.3.00.0100.00616.33
7.2.330.0100.00916.53
7.2.320.0070.01616.49
7.2.310.0100.01716.35
7.2.300.0110.01016.41
7.2.290.0070.01116.71
7.2.250.0150.00715.13
7.2.240.0040.01214.99
7.2.230.0040.00715.20
7.2.220.0100.00715.00
7.2.210.0110.00414.94
7.2.200.0080.00615.14
7.2.190.0000.01114.89
7.2.180.0030.00715.07
7.2.170.0030.01215.00
7.2.130.0080.00816.68
7.2.120.0100.00716.84
7.2.110.0000.01316.14
7.2.100.0140.00715.82
7.2.90.0150.01216.56
7.2.80.0170.00715.97
7.2.70.0170.01216.26
7.2.60.0110.01116.37
7.2.50.0110.01416.52
7.2.40.0140.00716.14
7.2.30.0220.00616.60
7.2.20.0150.00916.27
7.2.10.0180.00416.73
7.2.00.0100.00717.81
7.1.330.0070.00715.66
7.1.320.0070.00815.37
7.1.310.0060.00615.58
7.1.300.0040.00715.72
7.1.290.0110.00315.71
7.1.280.0060.00615.57
7.1.270.0120.00015.58
7.1.260.0070.00315.66
7.1.250.0110.01115.53
7.1.100.0070.00717.93
7.1.70.0000.00716.97
7.1.60.0180.00719.40
7.1.50.0070.02316.76
7.1.00.0070.07322.32
7.0.200.0000.00816.35
7.0.140.0070.07022.15
7.0.70.0030.07321.73
7.0.60.0100.07721.82
7.0.50.0100.07722.13
7.0.40.0070.08320.19
7.0.30.0130.07320.04
7.0.20.0100.08020.13
7.0.10.0100.07320.15
7.0.00.0030.08020.03
5.6.280.0000.07321.08
5.6.220.0000.08720.64
5.6.210.0070.06020.58
5.6.200.0100.08021.05
5.6.190.0070.08321.06
5.6.180.0070.08021.06
5.6.170.0100.08021.11
5.6.160.0070.04321.09
5.6.150.0100.08021.14
5.6.140.0130.07721.18
5.6.130.0030.06321.08
5.6.120.0100.07720.96
5.6.110.0130.07721.09
5.6.100.0070.07320.89
5.6.90.0000.08021.10
5.6.80.0000.05020.42
5.6.70.0070.08020.43
5.6.60.0000.08720.32
5.6.50.0130.06020.44
5.6.40.0070.08020.31
5.6.30.0000.05720.51
5.6.20.0030.08320.54
5.6.10.0100.05720.39
5.6.00.0030.05720.38
5.5.360.0000.06020.37
5.5.350.0070.06020.44
5.5.340.0070.07320.82
5.5.330.0000.04720.82
5.5.320.0200.07020.90
5.5.310.0030.08720.94
5.5.300.0070.05720.82
5.5.290.0100.08020.90
5.5.280.0030.08320.88
5.5.270.0130.07720.89
5.5.260.0030.06020.74
5.5.250.0030.08720.66
5.5.240.0100.04320.30
5.5.230.0000.06020.04
5.5.220.0030.08320.32
5.5.210.0070.05320.29
5.5.200.0030.08020.01
5.5.190.0130.05020.20
5.5.180.0030.04020.24
5.5.160.0030.03720.13
5.5.150.0030.08020.28
5.5.140.0070.04320.28
5.5.130.0100.06020.16
5.5.120.0070.05320.30
5.5.110.0100.05320.01
5.5.100.0000.05020.14
5.5.90.0000.08020.08
5.5.80.0000.06020.02
5.5.70.0030.08020.05
5.5.60.0070.05720.15
5.5.50.0070.07720.10
5.5.40.0000.06320.11
5.5.30.0070.07320.07
5.5.20.0100.07720.01
5.5.10.0030.07719.95
5.5.00.0100.05320.13
5.4.450.0000.08319.31
5.4.440.0130.07319.14
5.4.430.0000.07719.29
5.4.420.0030.08319.40
5.4.410.0130.06719.32
5.4.400.0030.07018.92
5.4.390.0000.07719.15
5.4.380.0000.08018.91
5.4.370.0030.08019.07
5.4.360.0200.06719.24
5.4.350.0100.06018.93
5.4.340.0100.07318.95
5.4.320.0070.04319.04
5.4.310.0030.05719.13
5.4.300.0030.06018.82
5.4.290.0030.06318.79
5.4.280.0030.05018.95
5.4.270.0000.08018.81
5.4.260.0000.05719.13
5.4.250.0000.08719.03
5.4.240.0070.04018.98
5.4.230.0030.04319.23
5.4.220.0030.07718.90
5.4.210.0000.08018.91
5.4.200.0070.07319.02
5.4.190.0100.05319.09
5.4.180.0100.05019.03
5.4.170.0070.07019.23
5.4.160.0000.08018.96
5.4.150.0070.07319.04
5.4.140.0030.07016.42
5.4.130.0000.07716.41
5.4.120.0030.05016.29
5.4.110.0200.05016.27
5.4.100.0030.04316.33
5.4.90.0000.04716.24
5.4.80.0000.07016.23
5.4.70.0030.04716.32
5.4.60.0030.06716.31
5.4.50.0030.07716.20
5.4.40.0100.05316.46
5.4.30.0070.07016.20
5.4.20.0030.07016.38
5.4.10.0070.05016.38
5.4.00.0030.05015.83
5.3.290.0000.08314.64
5.3.280.0100.07314.63
5.3.270.0000.07714.48
5.3.260.0100.06714.58
5.3.250.0070.04314.62
5.3.240.0030.07714.61
5.3.230.0000.07314.44
5.3.220.0070.06014.58
5.3.210.0030.08014.58
5.3.200.0000.05014.55
5.3.190.0070.07014.41
5.3.180.0030.07714.53
5.3.170.0000.07014.52
5.3.160.0100.06714.42
5.3.150.0070.07314.57
5.3.140.0100.07014.57
5.3.130.0000.07314.43
5.3.120.0030.08014.57
5.3.110.0030.06714.52
5.3.100.0070.06714.05
5.3.90.0030.07314.00
5.3.80.0030.04714.02
5.3.70.0030.07313.98
5.3.60.0030.07713.98
5.3.50.0030.04713.83
5.3.40.0000.08013.83
5.3.30.0000.07313.80
5.3.20.0000.04013.67
5.3.10.0030.03313.64
5.3.00.0030.07013.43
5.2.170.0000.03012.20
5.2.160.0070.02712.20
5.2.150.0030.05012.20
5.2.140.0030.05312.20
5.2.130.0030.02712.20
5.2.120.0000.03012.20
5.2.110.0000.06312.20
5.2.100.0030.04312.20
5.2.90.0000.06012.20
5.2.80.0030.04712.20
5.2.70.0000.03012.20
5.2.60.0000.03712.20
5.2.50.0000.03312.20
5.2.40.0000.03012.20
5.2.30.0000.03012.20
5.2.20.0000.06312.20
5.2.10.0030.04712.20
5.2.00.0000.06312.20
5.1.60.0000.02712.20
5.1.50.0000.05312.20
5.1.40.0000.05012.20
5.1.30.0000.05012.20
5.1.20.0070.05312.20
5.1.10.0070.05312.20
5.1.00.0070.03012.20
5.0.50.0030.04012.20
5.0.40.0070.03012.20
5.0.30.0070.06312.20
5.0.20.0030.02012.20
5.0.10.0000.02012.20
5.0.00.0030.04012.20
4.4.90.0000.01712.20
4.4.80.0030.03712.20
4.4.70.0030.01712.20
4.4.60.0000.03712.20
4.4.50.0000.03712.20
4.4.40.0030.05012.20
4.4.30.0030.02712.20
4.4.20.0000.03712.20
4.4.10.0000.03712.20
4.4.00.0000.05312.20
4.3.110.0030.02012.20
4.3.100.0070.03012.20
4.3.90.0000.01712.20
4.3.80.0000.05312.20
4.3.70.0000.02312.20
4.3.60.0030.01312.20
4.3.50.0000.01712.20
4.3.40.0000.03312.20
4.3.30.0000.03712.20
4.3.20.0000.02712.20
4.3.10.0030.03312.20
4.3.00.0070.02712.20

preferences:
65.41 ms | 400 KiB | 5 Q