3v4l.org

run code in 300+ PHP versions simultaneously
<?php // variable $table_name = 'Rendisk Circular Ikea Delft'; $table = 'esync_tagshistory'; $rows = 250; $data = ""; // connect to the database $connection = mysql_connect('localhost','eSyncExport','Rendisk@2013'); mysql_select_db('esync',$connection); // sending query will collect tag names of selected ewon $result = mysql_query("SELECT ESYNC_TAGS.NAME, _date, ESYNC_TAGSHISTORY.Val FROM ESYNC_TAGSHISTORY INNER JOIN ESYNC_TAGS ON ESYNC_TAGSHISTORY.TAGID=ESYNC_TAGS.ID WHERE ESYNC_TAGS.STATIONID=1 ORDER BY _date DESC LIMIT $rows"); if (!$result) { die("Query to show fields from table failed"); } $fields_num = mysql_num_fields($result); echo "<h1>{$table_name} last $rows rows</h1>"; echo "<table border='3' cellpadding ='10' <tr>"; // printing table headers for($i=0; $i<$fields_num; $i++) { $field = mysql_fetch_field($result); echo "<td>{$field->name}</td>"; } // printing table rows while($row = mysql_fetch_row($result)) { $data = ",['".$row[1]."', ".$row[2]."]".$data; echo "</tr>\n"; echo "<td rowspan ='1'>$row[0]</td>"; echo "<td rowspan ='1'>$row[1]</td>"; echo "<td rowspan ='1'>$row[2]</td>"; //echo $data; } mysql_free_result($result); //echo "</TABLE>"; $data = "['Date', 'Value']".$data; //echo $data; ?> <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ <?php echo $data; ?> ]); var options = { title: '<?php echo $table_name;?>', vAxis: {title: "On/Off"}, hAxis: {title: "Time"}, seriesType: "line", series: {5: {type: "line"}} }; var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["table"]}); google.setOnLoadCallback(drawTable); function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('string', 'Date'); data.addColumn('boolean', 'Value'); dataata.addRows([ ['Rij 1', 'Waarde 1'], ['Rij 2', 'Waarde 2'], ['Rij 3', 'Waarde 3'], ]); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); } </script> </head> <body> <div id="table_div"></div> </body> </html> <meta http-equiv="refresh" content="60"> </head> <body> <div id="chart_div" style="width: 100%; height: 700px;"></div> </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.0110.00716.49
8.3.60.0140.00716.36
8.3.50.0140.00521.99
8.3.40.0070.01318.80
8.3.30.0080.00818.80
8.3.20.0030.00520.19
8.3.10.0040.00423.53
8.3.00.0050.00323.69
8.2.180.0070.00718.41
8.2.170.0130.00722.96
8.2.160.0070.00720.44
8.2.150.0040.00424.18
8.2.140.0160.00324.66
8.2.130.0040.00721.00
8.2.120.0060.00326.16
8.2.110.0070.01022.25
8.2.100.0040.00817.93
8.2.90.0000.00819.14
8.2.80.0030.00617.97
8.2.70.0030.00617.74
8.2.60.0040.00418.04
8.2.50.0000.00918.07
8.2.40.0080.00022.24
8.2.30.0000.00720.62
8.2.20.0040.00417.69
8.2.10.0040.00418.25
8.2.00.0000.00718.27
8.1.280.0120.00425.92
8.1.270.0050.00320.45
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00422.23
8.1.230.0070.00317.88
8.1.220.0030.00517.77
8.1.210.0030.00618.77
8.1.200.0090.00017.38
8.1.190.0040.00417.11
8.1.180.0000.00918.10
8.1.170.0000.01318.36
8.1.160.0000.00720.67
8.1.150.0000.00718.77
8.1.140.0030.00619.57
8.1.130.0000.00817.70
8.1.120.0040.00417.46
8.1.110.0040.00417.38
8.1.100.0040.00417.46
8.1.90.0060.00317.45
8.1.80.0000.00717.44
8.1.70.0000.00717.43
8.1.60.0030.00617.54
8.1.50.0000.00817.42
8.1.40.0050.00317.49
8.1.30.0040.00417.68
8.1.20.0000.00717.66
8.1.10.0060.00317.64
8.1.00.0000.00817.55
8.0.300.0000.00818.77
8.0.290.0000.00816.88
8.0.280.0000.00718.40
8.0.270.0050.00317.25
8.0.260.0030.00317.27
8.0.250.0060.00317.01
8.0.240.0040.00417.06
8.0.230.0030.00317.00
8.0.220.0000.00816.87
8.0.210.0070.00016.96
8.0.200.0000.00717.00
8.0.190.0060.00317.01
8.0.180.0060.00317.00
8.0.170.0000.00816.98
8.0.160.0000.00716.82
8.0.150.0000.00716.98
8.0.140.0050.00316.82
8.0.130.0050.00013.34
8.0.120.0040.00416.85
8.0.110.0030.00616.79
8.0.100.0000.00716.97
8.0.90.0030.00616.82
8.0.80.0000.01516.89
8.0.70.0040.00416.93
8.0.60.0000.00716.84
8.0.50.0000.00816.91
8.0.30.0110.00917.03
8.0.20.0090.01117.40
8.0.10.0080.00017.19
8.0.00.0130.00616.83
7.4.330.0020.00216.79
7.4.320.0000.00716.60
7.4.300.0090.00016.59
7.4.290.0050.00216.66
7.4.280.0030.00316.57
7.4.270.0040.00416.57
7.4.260.0070.00016.50
7.4.250.0000.00816.61
7.4.240.0040.00416.64
7.4.230.0000.00716.52
7.4.220.0070.01416.69
7.4.210.0090.00616.66
7.4.200.0070.00016.56
7.4.160.0130.00616.73
7.4.150.0040.01417.40
7.4.140.0160.00517.86
7.4.130.0090.00816.53
7.4.120.0100.00816.74
7.4.110.0090.01216.45
7.4.100.0040.00316.39
7.4.90.0170.00016.32
7.4.80.0110.00719.39
7.4.70.0090.00616.50
7.4.60.0090.00916.56
7.4.50.0100.00716.62
7.4.40.0070.01316.58
7.4.30.0070.01016.59
7.4.00.0080.00715.08
7.3.330.0030.00413.14
7.3.320.0000.00513.17
7.3.310.0040.00416.38
7.3.300.0030.00316.30
7.3.290.0090.00616.28
7.3.280.0120.00816.29
7.3.270.0110.01117.40
7.3.260.0100.01016.41
7.3.250.0120.00616.47
7.3.240.0120.00516.41
7.3.230.0100.00716.58
7.3.210.0030.01316.55
7.3.200.0030.01316.15
7.3.190.0150.00016.38
7.3.180.0150.00316.33
7.3.170.0060.01016.31
7.3.160.0100.00716.50
7.3.120.0040.01114.74
7.3.110.0090.00914.82
7.3.100.0090.00614.61
7.3.90.0030.01415.00
7.3.80.0000.01115.12
7.3.70.0070.01014.83
7.3.60.0040.00714.94
7.3.50.0100.00314.46
7.3.40.0110.00714.68
7.3.30.0040.01614.73
7.3.20.0100.00316.52
7.3.10.0060.00916.43
7.3.00.0100.00516.54
7.2.330.0070.01016.37
7.2.320.0130.00816.59
7.2.310.0070.01016.41
7.2.300.0120.00916.57
7.2.290.0130.00716.64
7.2.250.0120.00914.96
7.2.240.0080.00814.66
7.2.230.0030.01215.15
7.2.220.0090.00614.78
7.2.210.0060.00315.08
7.2.200.0160.00014.91
7.2.190.0000.01514.91
7.2.180.0090.00615.05
7.2.170.0080.00814.85
7.2.160.0000.01614.57
7.2.150.0030.01216.75
7.2.140.0030.00716.72
7.2.130.0060.00816.84
7.2.120.0080.00716.68
7.2.110.0060.00916.78
7.2.100.0070.00716.63
7.2.90.0060.00816.65
7.2.80.0070.00616.82
7.2.70.0060.00816.76
7.2.60.0060.00716.78
7.2.50.0030.00816.68
7.2.40.0090.00516.84
7.2.30.0050.00516.66
7.2.20.0050.00916.71
7.2.10.0020.01116.68
7.2.00.0050.00817.65
7.1.330.0040.01415.58
7.1.320.0080.00315.41
7.1.310.0080.00415.77
7.1.300.0070.01015.62
7.1.290.0040.00715.48
7.1.280.0000.01615.58
7.1.270.0030.01415.39
7.1.260.0060.00915.43
7.1.250.0030.01015.49
7.1.240.0030.01015.64
7.1.230.0030.01015.66
7.1.220.0080.00415.61
7.1.210.0030.01015.64
7.1.200.0070.00715.38
7.1.190.0090.00415.64
7.1.180.0030.01315.41
7.1.170.0060.00315.32
7.1.160.0030.01315.43
7.1.150.0000.01115.61
7.1.140.0070.00715.51
7.1.130.0000.01115.67
7.1.120.0060.00615.63
7.1.110.0060.00315.64
7.1.100.0100.00416.70
7.1.90.0030.01415.63
7.1.80.0030.00715.65
7.1.70.0030.00616.42
7.1.60.0060.01317.64
7.1.50.0120.00016.30
7.1.40.0080.00615.53
7.1.30.0000.01715.65
7.1.20.0030.01015.70
7.1.10.0060.00615.59
7.1.00.0100.03719.09
7.0.330.0060.00615.34
7.0.320.0040.00815.52
7.0.310.0030.00615.11
7.0.300.0030.00915.29
7.0.290.0060.00615.38
7.0.280.0030.01015.40
7.0.270.0090.00615.27
7.0.260.0090.00615.27
7.0.250.0100.00015.27
7.0.240.0040.00815.20
7.0.230.0070.00715.46
7.0.220.0070.00315.18
7.0.210.0040.00815.50
7.0.200.0030.00716.05
7.0.190.0070.00715.46
7.0.180.0070.00715.23
7.0.170.0080.00415.42
7.0.160.0090.00315.07
7.0.150.0000.01515.14
7.0.140.0000.01415.31
7.0.130.0000.01115.34
7.0.120.0080.00415.18
7.0.110.0070.00715.09
7.0.100.0040.00715.06
7.0.90.0030.01015.21
7.0.80.0030.00715.27
7.0.70.0100.00315.32
7.0.60.0080.04118.54
7.0.50.0090.04516.62
7.0.40.0130.03816.72
7.0.30.0080.04416.73
7.0.20.0120.03216.80
7.0.10.0090.03516.72
7.0.00.0050.04216.65
5.6.400.0040.01114.27
5.6.390.0000.00914.44
5.6.380.0070.00314.12
5.6.370.0040.00814.45
5.6.360.0100.00014.35
5.6.350.0030.00614.27
5.6.340.0070.00714.43
5.6.330.0070.00714.34
5.6.320.0070.00714.45
5.6.310.0000.01414.16
5.6.300.0120.00314.16
5.6.290.0030.00614.18
5.6.280.0020.02517.47
5.6.270.0070.01014.12
5.6.260.0040.01114.45
5.6.250.0080.00614.20
5.6.240.0060.00614.28
5.6.230.0030.00714.13
5.6.220.0090.00614.10
5.6.210.0020.02617.50
5.6.200.0020.03016.26
5.6.190.0060.04117.36
5.6.180.0150.02117.46
5.6.170.0170.04117.38
5.6.160.0100.04517.34
5.6.150.0030.03116.14
5.6.140.0080.04516.29
5.6.130.0060.02916.00
5.6.120.0110.03517.57
5.6.110.0070.02317.67
5.6.100.0050.02317.52
5.6.90.0120.04017.56
5.6.80.0110.04217.25
5.6.70.0080.00814.19
5.6.60.0000.01213.99
5.6.50.0100.00314.11
5.6.40.0130.00314.27
5.6.30.0040.01414.40
5.6.20.0040.01214.15
5.6.10.0000.01314.20
5.6.00.0030.01014.13
5.5.380.0110.00313.89
5.5.370.0070.00713.95
5.5.360.0130.00313.94
5.5.350.0070.04517.12
5.5.340.0070.03016.04
5.5.330.0050.02617.14
5.5.320.0130.02517.12
5.5.310.0220.03817.11
5.5.300.0050.02315.97
5.5.290.0110.04216.10
5.5.280.0060.02417.54
5.5.270.0050.02817.50
5.5.260.0060.02517.46
5.5.250.0050.02017.42
5.5.240.0100.02217.07
5.5.230.0070.00713.69
5.5.220.0030.00613.80
5.5.210.0110.00314.11
5.5.200.0060.00814.11
5.5.190.0080.00813.89
5.5.180.0030.00614.09
5.5.170.0080.00414.04
5.5.160.0000.01113.80
5.5.150.0030.00913.88
5.5.140.0000.01213.87
5.5.130.0000.01313.85
5.5.120.0110.00313.99
5.5.110.0000.00914.18
5.5.100.0000.01514.09
5.5.90.0100.00313.88
5.5.80.0060.00613.83
5.5.70.0000.01313.63
5.5.60.0030.00914.18
5.5.50.0040.01114.13
5.5.40.0000.01013.86
5.5.30.0070.01013.76
5.5.20.0000.01214.08
5.5.10.0000.01213.95
5.5.00.0060.00314.15

preferences:
79.09 ms | 401 KiB | 5 Q