3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once('config.php'); if(!$_GET['id']){ $pagetitle = 'Blogs - '.$sitename; $qb = mysql_query("SELECT * FROM blogs") or die(mysql_error()); $qn = mysql_num_rows($qb); require_once('header.php'); echo "<h1>Blogs</h1>"; echo '<ul>'; while($post=mysql_fetch_array($qb)){ echo '<a style="margin-top:20px;display:block;margin-left:20px;" href="blog.php?id='.$post['id'].'">'.$post['title'].'</a>'; } echo '</ul>'; } else { $id = mysql_real_escape_string($_GET['id']); $qb = mysql_query("SELECT * FROM blogs WHERE id='$id'") or die(mysql_error()); $post = mysql_fetch_array($qb); $exist = mysql_num_rows($qb); if($exist=='1'){ $pagetitle = $post['title'].' - '.$sitename; require_once('header.php'); echo '<h1>'.$post['title'].'</h1>'; echo '<p class="para">'.nl2br($post['content']).'</p>'; $qrm = mysql_query("SELECT * FROM blogs WHERE id<>'$id'") or die(mysql_error()); $qnrm = mysql_num_rows($qrm); if($qnrm=='0'){ echo '<!-- no articles to read -->'; } else { echo "<h2 class="h2">You may also Read:</h2>"; echo '<ul>'; while($post=mysql_fetch_array($qrm)){ echo '<a style="margin-top:20px;display:block;margin-left:20px;" href="blog.php?id='.$post['id'].'">'.$post['title'].'</a>'; } echo '</ul>'; } } else { header("Location: index.php?msg=Blog article not found"); } } require_once('sidebar.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)
5.4.320.0070.08318.87
5.4.310.0130.07318.88
5.4.300.0030.06018.92
5.4.290.0100.07718.85
5.4.280.0130.06719.00
5.4.270.0130.05719.15
5.4.260.0070.07319.16
5.4.250.0000.04318.97
5.4.240.0030.04319.14
5.4.230.0100.04319.04
5.4.220.0100.07319.14
5.4.210.0170.05319.00
5.4.200.0100.05318.87
5.4.190.0100.03719.15
5.4.180.0030.03718.86
5.4.170.0000.04019.19
5.4.160.0030.03719.10
5.4.150.0000.04019.22
5.4.140.0000.03716.38
5.4.130.0030.04016.30
5.4.120.0070.03016.38
5.4.110.0100.03016.43
5.4.100.0000.04016.38
5.4.90.0030.03316.43
5.4.80.0000.04316.37
5.4.70.0030.03316.27
5.4.60.0130.02316.40
5.4.50.0030.03316.54
5.4.40.0000.03716.42
5.4.30.0070.03016.64
5.4.20.0030.03316.38
5.4.10.0100.04016.52
5.4.00.0070.03315.95
5.3.290.0070.08014.65
5.3.280.0100.03714.49
5.3.270.0030.04314.56
5.3.260.0100.03014.59
5.3.250.0000.04014.56
5.3.240.0030.04014.50
5.3.230.0030.04314.70
5.3.220.0070.03714.51
5.3.210.0000.04014.51
5.3.200.0000.04314.55
5.3.190.0030.03714.53
5.3.180.0030.03714.51
5.3.170.0000.04714.53
5.3.160.0070.03314.50
5.3.150.0030.03714.50
5.3.140.0000.04314.50
5.3.130.0000.04014.49
5.3.120.0030.03714.38
5.3.110.0030.03714.46
5.3.100.0100.03314.16
5.3.90.0030.03313.91
5.3.80.0000.03713.82
5.3.70.0030.03314.03
5.3.60.0030.03313.95
5.3.50.0000.03713.91
5.3.40.0000.03714.07
5.3.30.0030.03313.90
5.3.20.0070.03013.64
5.3.10.0070.03013.49
5.3.00.0030.03313.44

preferences:
141.5 ms | 1394 KiB | 7 Q