3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $currentDateTime = new DateTime(); $url = 'https://www.lmsal.com/hek/hcr?cmd=view-planned-events&instrument=iris'; $content = file_get_contents($url); $dom = new DOMDocument(); @$dom->loadHTML($content); $table = $dom->getElementsByTagName('table')->item(0); $rows = $table->getElementsByTagName('tr'); foreach($rows as $row) { $columns = $row->getElementsByTagName('td'); if ($columns->length > 0) { $dateTimeRange = $columns->item(0)->nodeValue; // Match the pattern "YYYY-MM-DD HH:MM:SS - HH:MM:SS" and store the matches in $matches array preg_match_all('/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}-\d{2}:\d{2}:\d{2}/', $dateTimeRange, $matches); foreach ($matches[0] as $match) { list($start, $end) = explode("-", $match); $startDateTime = DateTime::createFromFormat('Y-m-d H:i:s', trim($start)); $endDateTime = DateTime::createFromFormat('Y-m-d H:i:s', trim($end)); // If the current time is within the start and end times, print it out if ($startDateTime <= $currentDateTime && $currentDateTime <= $endDateTime) { echo $match . '<br>'; } } } } ?>

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.5.00.0140.00719.85
8.4.150.0010.00114.05
8.4.140.0180.00417.98
8.4.130.0110.00818.37
8.4.120.0100.01020.57
8.4.110.0080.00222.59
8.4.100.0140.00719.00
8.4.90.0120.00820.54
8.4.80.0110.00019.01
8.4.70.0130.00818.97
8.4.60.0110.01018.56
8.4.50.0090.01118.63
8.4.40.0150.00720.50
8.4.30.0100.01322.10
8.4.20.0070.00718.21
8.4.10.0000.00921.95
8.3.280.0130.00818.63
8.3.270.0120.00716.73
8.3.260.0140.00516.70
8.3.250.0110.00518.98
8.3.240.0140.00616.90
8.3.230.0140.00816.73
8.3.220.0110.00618.89
8.3.210.0070.00217.09
8.3.200.0060.00416.70
8.3.190.0090.00917.26
8.3.180.0140.00618.95
8.3.170.0170.00316.96
8.3.160.0120.00618.95
8.3.150.0160.00018.97
8.3.140.0060.00320.54
8.3.130.0090.00916.70
8.3.120.0030.00619.06
8.3.110.0080.00320.94
8.3.100.0030.00724.06
8.3.90.0130.00726.77
8.3.80.0090.00018.56
8.3.70.0190.00018.56
8.3.60.0130.01017.00
8.3.50.0060.00917.11
8.3.40.0100.00320.27
8.3.30.0150.00019.06
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0100.01016.78
8.2.280.0140.00518.53
8.2.270.0100.01016.85
8.2.260.0060.01216.54
8.2.250.0080.01218.64
8.2.240.0090.00917.29
8.2.230.0090.00622.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0060.00317.00
8.2.190.0130.00316.88
8.2.180.0130.00717.00
8.2.170.0100.00619.16
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.70
8.2.110.0070.00322.11
8.2.100.0060.00618.03
8.2.90.0040.00418.00
8.2.80.0040.00418.86
8.2.70.0080.00017.88
8.2.60.0200.00017.63
8.2.50.0160.00317.75
8.2.40.0130.00417.50
8.2.30.0130.00417.38
8.2.20.0080.00817.63
8.2.10.0080.00817.63
8.2.00.0120.00418.00
8.1.330.0110.00922.16
8.1.320.0140.00718.16
8.1.310.0110.00716.39
8.1.300.0000.00918.57
8.1.290.0000.00930.84
8.1.280.0120.00625.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00920.27
8.1.230.0090.00317.95
8.1.220.0050.00517.89
8.1.210.0000.00918.77
8.1.200.0000.00817.48
8.1.190.0170.00017.50
8.1.180.0080.00817.50
8.1.170.0130.00317.13
8.1.160.0090.00817.38
8.1.150.0150.00317.25
8.1.140.0080.00917.25
8.1.130.0170.00017.25
8.1.120.0130.00417.38
8.1.110.0070.01017.13
8.1.100.0040.01317.50
8.1.90.0100.00717.38
8.1.80.0140.00217.36
8.1.70.0090.00717.48
8.1.60.0140.00517.63
8.1.50.0170.00317.38
8.1.40.0210.00517.38
8.1.30.0140.00517.50
8.1.20.0170.00317.38
8.1.10.0190.00017.25
8.1.00.0120.00617.50
8.0.300.0000.00918.77
8.0.290.0040.00417.00
8.0.280.0160.00016.71
8.0.270.0110.00616.75
8.0.260.0100.00517.00
8.0.250.0060.01116.63
8.0.240.0060.00916.72
8.0.230.0080.00816.75
8.0.220.0160.00016.75
8.0.210.0120.00416.52
8.0.200.0100.00717.00
8.0.190.0170.00016.88
8.0.180.0140.00317.10
8.0.170.0130.00316.88
8.0.160.0180.00017.13
8.0.150.0120.00616.96
8.0.140.0140.00316.88
8.0.130.0080.00816.75
8.0.120.0060.01216.75
8.0.110.0130.00317.13
8.0.100.0180.00016.73
8.0.90.0170.00016.88
8.0.80.0140.00517.00
8.0.70.0050.01116.75
8.0.60.0170.00016.74
8.0.50.0170.00016.88
8.0.30.0060.01116.61
8.0.20.0190.00016.88
8.0.10.0060.01116.73

preferences:
114.18 ms | 403 KiB | 5 Q