3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Setting up curl function curl($url) { $ch = curl_init(); // Starting cURL curl_setopt($ch, CURLOPT_URL, $url); // Defining URL function curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Setting cURL options $data = curl_exec($ch); // Begin the operation curl_close($ch); // Stopping cURL return $data; // Saving the data } ?> <?php // Culling the data function scrape_between($data, $start, $end){ $data = stristr($data, $start); // Removing all data before starting point $data = substr($data, strlen($start)); // Stripping $start $stop = stripos($data, $end); // Defining the end point $data = substr($data, 0, $stop); // Stripping all data from after and including the $end of the data to scrap return $data; // Saving the data } ?> <?php $scraped_page = curl("http://www.hko.gov.hk/aviat/amt_e/atis.htm"); // Defining the page to be grabbed $scraped_data = scrape_between($scraped_page, "A-RUNWAY", "</tr>"); // Defining the data to grab $atis = str_replace("</td><td class=atislines align=\"left\">","",$scraped_data); // Removing unnecessary code $atis2 = str_replace("</td>","",$atis); // Removing unnecessary code $scraped_data_d = scrape_between($scraped_page, "D-RUNWAY", "</tr>"); // Defining the data to grab $atis_d = str_replace("</td><td class=atislines align=\"left\">","",$scraped_data_d); // Removing unnecessary code $atis2_d = str_replace("</td>","",$atis_d); // Removing unnecessary code echo "Active Runway: " . $atis2;// HTML Code being written echo "Second Runway: " . $atis2_d;// HTML Code for D-Runway ?>

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.0080.00818.68
8.3.50.0070.00716.48
8.3.40.0090.00918.97
8.3.30.0070.00718.47
8.3.20.0000.00720.35
8.3.10.0080.00021.94
8.3.00.0040.00417.93
8.2.180.0090.00616.75
8.2.170.0150.00022.96
8.2.160.0120.00320.39
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0090.00022.27
8.2.100.0060.00619.45
8.2.90.0000.00819.23
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0040.00417.80
8.2.50.0050.00318.07
8.2.40.0000.00819.38
8.2.30.0040.00420.67
8.2.20.0050.00317.66
8.2.10.0050.00217.96
8.2.00.0080.00018.09
8.1.280.0060.00925.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00023.82
8.1.230.0070.00419.14
8.1.220.0090.00017.74
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0090.00017.25
8.1.180.0040.00418.10
8.1.170.0040.00418.29
8.1.160.0000.00821.91
8.1.150.0070.00018.88
8.1.140.0000.00817.28
8.1.130.0070.00017.61
8.1.120.0000.00717.38
8.1.110.0000.00817.35
8.1.100.0000.00717.43
8.1.90.0000.00717.33
8.1.80.0040.00417.35
8.1.70.0000.00717.24
8.1.60.0040.00417.61
8.1.50.0030.00617.46
8.1.40.0040.00417.39
8.1.30.0000.00917.64
8.1.20.0000.00817.46
8.1.10.0000.00717.53
8.1.00.0030.00617.37
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00718.48
8.0.270.0000.00717.34
8.0.260.0060.00017.19
8.0.250.0070.00016.96
8.0.240.0040.00416.98
8.0.230.0050.00317.00
8.0.220.0070.00016.93
8.0.210.0050.00216.91
8.0.200.0030.00516.90
8.0.190.0040.00817.02
8.0.180.0030.00517.01
8.0.170.0000.00816.96
8.0.160.0000.00716.94
8.0.150.0000.00716.97
8.0.140.0040.00416.90
8.0.130.0000.00513.39
8.0.120.0070.00016.83
8.0.110.0080.00016.84
8.0.100.0000.00816.95
8.0.90.0070.00016.93
8.0.80.0060.00916.89
8.0.70.0040.00417.02
8.0.60.0070.00016.91
8.0.50.0000.00716.70
8.0.30.0070.01317.03
8.0.20.0110.00717.40
8.0.10.0000.00816.79
8.0.00.0080.01616.68
7.4.330.0060.00015.08
7.4.320.0000.00616.42
7.4.300.0060.00016.54
7.4.290.0000.00816.47
7.4.280.0070.00016.57
7.4.270.0000.00716.56
7.4.260.0000.00716.58
7.4.250.0070.00016.50
7.4.240.0040.00316.50
7.4.230.0040.00416.67
7.4.220.0190.00616.58
7.4.210.0140.00016.41
7.4.200.0000.00716.27
7.4.160.0060.00916.56
7.4.150.0110.00617.40
7.4.140.0140.00517.86
7.4.130.0110.00616.54
7.4.120.0060.01116.59
7.4.110.0060.01716.53
7.4.100.0070.01316.45
7.4.90.0100.00716.62
7.4.80.0090.00919.39
7.4.70.0120.00416.48
7.4.60.0100.00716.59
7.4.50.0000.00816.57
7.4.40.0060.01016.47
7.4.30.0180.00316.20
7.4.00.0070.00714.97
7.3.330.0000.00613.24
7.3.320.0000.00513.29
7.3.310.0070.00016.41
7.3.300.0070.00016.26
7.3.290.0060.00816.30
7.3.280.0110.00816.29
7.3.270.0150.00417.40
7.3.260.0100.00716.30
7.3.250.0070.00916.25
7.3.240.0120.00916.53
7.3.230.0070.01016.39
7.3.210.0070.01016.39
7.3.200.0030.01416.66
7.3.190.0110.00516.44
7.3.180.0080.00816.30
7.3.170.0060.01316.30
7.3.160.0090.00816.41
7.2.330.0080.00916.67
7.2.320.0150.00316.66
7.2.310.0030.01416.62
7.2.300.0060.01116.63
7.2.290.0090.01216.40
7.2.110.0130.00616.33
7.2.60.0070.00716.77
7.2.00.0000.01419.02
7.1.200.0100.00315.65
7.1.100.0000.01118.03
7.1.70.0000.00716.83
7.1.60.0110.01119.19
7.1.50.0070.01316.94
7.1.00.0030.07722.33
7.0.200.0000.01016.74
7.0.100.0170.08020.05
7.0.90.0070.08319.98
7.0.80.0030.08319.95
7.0.70.0130.05719.98
7.0.60.0100.08019.97
7.0.50.0100.05720.43
7.0.40.0070.04020.18
7.0.30.0030.04320.13
7.0.20.0100.03720.05
7.0.10.0000.04719.98
7.0.00.0000.04720.10
5.6.280.0000.03321.08
5.6.250.0030.08720.50
5.6.240.0070.06020.67
5.6.230.0100.07320.63
5.6.220.0100.08720.54
5.6.210.0070.05020.66
5.6.200.0130.05321.12
5.6.190.0070.04021.14
5.6.180.0030.06021.05
5.6.170.0070.04320.92
5.6.160.0070.04021.01
5.6.150.0030.04320.95
5.6.140.0100.03721.04
5.6.130.0070.06721.04
5.6.120.0070.04021.05
5.6.110.0070.04021.03
5.6.100.0030.04321.13
5.6.90.0070.08321.09
5.6.80.0100.03320.50
5.6.70.0070.04320.44
5.6.60.0070.04020.34
5.6.50.0030.04320.33
5.6.40.0000.05720.36
5.6.30.0000.04320.44
5.6.20.0070.03720.47
5.6.10.0030.04020.42
5.6.00.0100.03320.43
5.5.380.0200.06720.37
5.5.370.0100.07020.36
5.5.360.0100.08020.41
5.5.350.0100.07720.43
5.5.340.0000.05020.65
5.5.330.0130.03720.81
5.5.320.0130.03320.75
5.5.310.0030.04320.92
5.5.300.0030.04320.90
5.5.290.0030.04720.65
5.5.280.0130.05320.84
5.5.270.0070.04320.73
5.5.260.0130.05720.79
5.5.250.0100.08020.46
5.5.240.0030.04320.18
5.5.230.0030.04320.28
5.5.220.0030.04020.21
5.5.210.0070.03720.28
5.5.200.0070.05020.16
5.5.190.0100.06720.26
5.5.180.0030.04020.14
5.5.160.0100.03320.15
5.5.150.0030.04020.21
5.5.140.0030.04020.16
5.5.130.0070.04320.18
5.5.120.0130.03020.11
5.5.110.0100.03320.26
5.5.100.0030.07720.18
5.5.90.0030.04719.94
5.5.80.0070.03720.12
5.5.70.0070.04020.11
5.5.60.0070.07720.01
5.5.50.0200.06720.06
5.5.40.0070.08019.97
5.5.30.0130.04720.02
5.5.20.0130.07720.11
5.5.10.0030.07720.11
5.5.00.0030.05020.03
5.4.450.0000.05019.46
5.4.440.0170.03019.20
5.4.430.0070.04019.45
5.4.420.0070.03719.35
5.4.410.0030.04719.23
5.4.400.0000.04018.90
5.4.390.0000.04719.22
5.4.380.0030.03718.88
5.4.370.0070.03718.91
5.4.360.0030.04019.12
5.4.350.0030.08319.21
5.4.340.0000.04319.12
5.4.320.0000.04019.05
5.4.310.0030.03719.05
5.4.300.0030.03719.12
5.4.290.0030.03719.04
5.4.280.0000.04718.94
5.4.270.0030.04318.94
5.4.260.0070.03719.16
5.4.250.0070.05318.88
5.4.240.0070.04719.20
5.4.230.0030.03719.20
5.4.220.0000.07719.20
5.4.210.0100.07719.04
5.4.200.0070.08019.12
5.4.190.0100.07319.11
5.4.180.0000.08318.93
5.4.170.0000.05719.02
5.4.160.0070.03718.86
5.4.150.0070.08319.01
5.4.140.0130.07016.49
5.4.130.0070.07016.54
5.4.120.0100.06316.38
5.4.110.0130.05716.44
5.4.100.0070.06016.54
5.4.90.0130.06016.50
5.4.80.0170.04016.46
5.4.70.0100.05716.54
5.4.60.0100.05716.36
5.4.50.0100.07016.36
5.4.40.0070.06716.30
5.4.30.0030.08016.32
5.4.20.0000.08016.40
5.4.10.0130.05016.36
5.4.00.0170.06015.77

preferences:
56.81 ms | 400 KiB | 5 Q