3v4l.org

run code in 300+ PHP versions simultaneously
<?php // connect to database //db_host = "localhost" ; $db_name = "maffeij_art" ; //$db_user = "maffeij" ; //$db_password = "a1yorkie" ; @ $db = mysql_pconnect('localhost','maffeij_maffeij','sheepish1986'); if(!$db) { echo 'Could not connect to the database'; exit; } // select table mysql_select_db ('maffeij_art'); // see if we should be showing the category or the sub category $sub = trim($_POST['sub']); if(empty($sub)) { // we didn't come from an edit record, we came from a results page // so grab the id appended to the url $sub = $_GET['sub']; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Contents</title> </head> <!-- <body text="#000000" link="#666666" vlink="#808080" alink="#000000" bgcolor="#CCCCCC"> --> <body text="#000000" link="#666666" vlink="#808080" alink="#000000" bgcolor="#666666"> <p align="center">&nbsp;</p> <p align="center"> <?php if($sub == '') { echo "<a href='detail.php?id=179&home=1' target ='mainframe'><img border='0' src='images/home.gif' width='140' height='40'></a>"; } else { //echo "<a href='contents.php' target ='menuframe'><img border='0' src='images/back.gif' width='140' height='40'></a>"; echo "<a href='contents.php'><img border='0' src='images/return.gif' width='140' height='40'></a>"; } echo "<img border='0' src='images/line.gif'>"; if($sub == '') { $query = 'select * from category order by catorder'; } else { $query = "select * from subcategory where parentid = ".$sub." order by subcatorder"; } $result = mysql_query($query); $num_results = mysql_num_rows($result); for($i=0; $i < $num_results; $i++) { $row = mysql_fetch_array($result); $id = htmlspecialchars(stripslashes($row['id'])); $parentid = htmlspecialchars(stripslashes($row['parentid'])); $name = htmlspecialchars(stripslashes($row['name'])); $url = htmlspecialchars(stripslashes($row['url'])); $image = htmlspecialchars(stripslashes($row['image'])); $target = htmlspecialchars(stripslashes($row['target'])); if($image != '') { if($url != '') { if($target == '') { echo "<a href='$url'><img border='0' src='images/$image' width='140' height='40'></a>"; } else { echo "<a href='$url' target = '$target'><img border='0' src='images/$image' width='140' height='40'></a>"; } } else { echo "<img border='0' src='images/$image' width='140' height='40'>"; } } else { if($url != '') { if($target == '') { echo "<a href='$url'>".$name."</a>"; } else { echo "<font color='#666666' size='1' face='Arial Special G1'><a href='$url' target = '$target'>".$name."</a>"; } } else { echo $name; } } //echo $name; } ?> <!-- <base target="mainframe"> <CENTER> <form action="browse.php" method="post"> &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="keyword" SIZE="10"> &nbsp;&nbsp;&nbsp;&nbsp;<input type="image" src="images/search.gif"> </form> </CENTER> <p align="center">&nbsp;</p> --> </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)
8.3.70.0120.00418.30
8.3.60.0150.00916.88
8.3.50.0120.00716.53
8.3.40.0070.00718.79
8.3.30.0100.01018.84
8.3.20.0050.00318.99
8.3.10.0000.00821.95
8.3.00.0040.00419.40
8.2.190.0090.00618.63
8.2.180.0070.01018.13
8.2.170.0090.00622.96
8.2.160.0080.00520.39
8.2.150.0070.00725.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0060.00319.33
8.2.110.0040.00421.20
8.2.100.0080.00318.09
8.2.90.0000.00819.20
8.2.80.0000.00818.05
8.2.70.0040.00418.00
8.2.60.0040.00418.02
8.2.50.0040.00418.10
8.2.40.0000.00820.45
8.2.30.0030.00519.17
8.2.20.0040.00418.11
8.2.10.0000.00818.04
8.2.00.0040.00418.18
8.1.280.0090.00625.92
8.1.270.0080.00023.83
8.1.260.0070.00026.35
8.1.250.0000.00928.09
8.1.240.0060.00322.24
8.1.230.0080.00419.23
8.1.220.0000.01017.76
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00717.23
8.1.180.0030.00518.10
8.1.170.0030.00618.64
8.1.160.0000.00719.00
8.1.150.0070.00018.84
8.1.140.0110.00019.54
8.1.130.0000.00818.87
8.1.120.0050.00217.43
8.1.110.0040.00417.54
8.1.100.0000.00717.43
8.1.90.0030.00717.41
8.1.80.0050.00517.54
8.1.70.0000.00717.40
8.1.60.0030.00617.68
8.1.50.0000.00917.59
8.1.40.0030.00617.54
8.1.30.0050.00317.54
8.1.20.0030.00917.63
8.1.10.0080.00017.63
8.1.00.0000.00717.39
8.0.300.0000.00719.85
8.0.290.0080.00016.75
8.0.280.0000.00718.40
8.0.270.0030.00317.30
8.0.260.0000.00716.82
8.0.250.0050.00317.05
8.0.240.0040.00416.97
8.0.230.0000.00817.04
8.0.220.0030.00317.01
8.0.210.0000.00716.98
8.0.200.0030.00617.06
8.0.190.0040.00417.05
8.0.180.0000.00717.09
8.0.170.0040.00416.93
8.0.160.0000.00717.05
8.0.150.0040.00416.98
8.0.140.0000.00716.93
8.0.130.0030.00313.40
8.0.120.0080.00016.96
8.0.110.0040.00416.87
8.0.100.0040.00417.05
8.0.90.0040.00416.93
8.0.80.0090.00916.94
8.0.70.0050.00317.01
8.0.60.0040.00416.90
8.0.50.0000.00716.95
8.0.30.0060.01017.15
8.0.20.0120.00717.40
8.0.10.0050.00217.00
8.0.00.0080.01116.85
7.4.330.0000.00515.55
7.4.320.0000.00716.54
7.4.300.0060.00016.63
7.4.290.0030.00316.60
7.4.280.0080.00016.55
7.4.270.0000.00716.68
7.4.260.0030.00313.35
7.4.250.0040.00516.62
7.4.240.0070.00016.65
7.4.230.0070.00016.45
7.4.220.0140.00616.71
7.4.210.0070.01316.62
7.4.200.0070.00016.65
7.4.160.0070.00916.65
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0200.00016.64
7.4.120.0120.00816.65
7.4.110.0070.01416.61
7.4.100.0070.01116.57
7.4.90.0120.00616.46
7.4.80.0070.01019.39
7.4.70.0100.00616.74
7.4.60.0100.00716.64
7.4.50.0090.00616.42
7.4.40.0120.00416.58
7.4.30.0070.01016.51
7.4.00.0070.00715.04
7.3.330.0030.00313.18
7.3.320.0000.00613.15
7.3.310.0000.00716.27
7.3.300.0060.00016.30
7.3.290.0070.00016.30
7.3.280.0080.00716.31
7.3.270.0170.00317.40
7.3.260.0130.00516.33
7.3.250.0150.00716.47
7.3.240.0100.00816.38
7.3.230.0100.00716.50
7.3.210.0100.00716.60
7.3.200.0070.01416.30
7.3.190.0150.00816.20
7.3.180.0120.00616.47
7.3.170.0150.00316.47
7.3.160.0160.00016.31
7.3.10.0080.00416.54
7.3.00.0000.01016.32
7.2.330.0150.00916.67
7.2.320.0120.00616.63
7.2.310.0060.01016.39
7.2.300.0000.01816.52
7.2.290.0070.01016.66
7.2.130.0000.01216.64
7.2.120.0040.00716.58
7.2.110.0060.00316.59
7.2.100.0040.01116.31
7.2.90.0070.00716.84
7.2.80.0160.00316.66
7.2.70.0030.01216.99
7.2.60.0050.01016.60
7.2.50.0140.00316.98
7.2.40.0040.00816.70
7.2.30.0090.00316.86
7.2.20.0000.01116.94
7.2.10.0000.01216.60
7.2.00.0100.00617.84
7.1.250.0060.00915.42
7.1.200.0030.00815.55
7.1.100.0000.01018.06
7.1.70.0000.01116.65
7.1.60.0330.02033.28
7.1.50.1200.01332.88
7.1.40.2700.01732.67
7.1.30.0170.02032.50
7.1.20.0430.01332.90
7.1.10.0500.02014.63
7.1.00.0070.01314.86
7.0.200.0130.00714.81
7.0.190.0030.01714.64
7.0.180.1300.01014.38
7.0.170.0230.01314.64
7.0.160.0270.01714.36
7.0.150.0130.01714.49
7.0.140.0100.01014.43
7.0.130.0100.02014.94
7.0.120.0400.01014.63
7.0.110.0900.01714.66
7.0.100.0070.01714.59
7.0.90.0030.01314.48
7.0.80.2470.01314.59
7.0.70.0100.01314.48
7.0.60.0170.00714.20
7.0.50.1970.01714.43
7.0.40.0500.01714.66
7.0.30.0100.01314.61
7.0.20.0270.01714.41
7.0.10.0230.01314.18
7.0.00.0100.01014.71

preferences:
43.68 ms | 401 KiB | 5 Q