3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '2018-10-26'; $daysLeft = 4; $startDateObj = new DateTime($string); var_dump($startDateObj); $endDateObj = new DateTime($string); $endDateObj = $endDateObj->modify('+'.$daysLeft.' days'); var_dump($endDateObj); $interval = new DateInterval('P'.$daysLeft.'D'); var_dump($interval); $dateRange = new DatePeriod($startDateObj, $interval, $endDateObj); var_dump($dateRange); foreach($dateRange as $date) { echo "1 day!".PHP_EOL; }

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.40.0060.00918.70
8.3.30.0090.00618.98
8.3.20.0000.00819.34
8.3.10.0000.00921.89
8.3.00.0040.00420.58
8.2.170.0070.01122.96
8.2.160.0070.00721.07
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0040.00419.95
8.2.110.0040.00720.84
8.2.100.0070.00718.02
8.2.90.0040.00417.85
8.2.80.0000.01018.00
8.2.70.0050.00317.93
8.2.60.0040.00418.22
8.2.50.0090.00018.10
8.2.40.0030.00619.45
8.2.30.0040.00419.38
8.2.20.0000.00818.27
8.2.10.0030.00618.12
8.2.00.0030.00617.88
8.1.270.0030.00620.79
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0050.00523.96
8.1.230.0040.00822.66
8.1.220.0080.00017.78
8.1.210.0080.00418.77
8.1.200.0120.00017.48
8.1.190.0000.00817.47
8.1.180.0100.00318.10
8.1.170.0040.00418.77
8.1.160.0000.00718.95
8.1.150.0040.00419.00
8.1.140.0000.00722.07
8.1.130.0030.00320.20
8.1.120.0000.00717.59
8.1.110.0000.00717.61
8.1.100.0040.00417.69
8.1.90.0040.00417.58
8.1.80.0000.00817.71
8.1.70.0020.00517.67
8.1.60.0050.00317.62
8.1.50.0030.00517.72
8.1.40.0040.00417.59
8.1.30.0060.00317.85
8.1.20.0040.00417.75
8.1.10.0040.00417.76
8.1.00.0040.00417.74
8.0.300.0040.00421.63
8.0.290.0030.00716.88
8.0.280.0000.00718.59
8.0.270.0030.00317.26
8.0.260.0030.00518.49
8.0.250.0000.00717.20
8.0.240.0030.00517.23
8.0.230.0070.00017.15
8.0.220.0000.00717.17
8.0.210.0040.00417.01
8.0.200.0030.00617.19
8.0.190.0030.00617.25
8.0.180.0080.00017.21
8.0.170.0090.00017.25
8.0.160.0000.00817.11
8.0.150.0000.00717.19
8.0.140.0040.00417.14
8.0.130.0080.00013.43
8.0.120.0040.00417.13
8.0.110.0040.00417.05
8.0.100.0000.00817.26
8.0.90.0040.00417.21
8.0.80.0050.01117.09
8.0.70.0060.00317.09
8.0.60.0000.00717.12
8.0.50.0080.00017.11
8.0.30.0110.00917.47
8.0.20.0130.00917.40
8.0.10.0000.00817.28
8.0.00.0110.01017.07
7.4.330.0050.00015.55
7.4.320.0000.00716.84
7.4.300.0000.00616.79
7.4.290.0030.00516.61
7.4.280.0050.00916.75
7.4.270.0080.00016.68
7.4.260.0000.00716.63
7.4.250.0090.00016.68
7.4.240.0030.00616.84
7.4.230.0000.00716.55
7.4.220.0080.00016.80
7.4.210.0100.00616.72
7.4.200.0000.00716.73
7.4.160.0100.01016.68
7.4.140.0150.00717.86
7.4.130.0160.00516.83
7.4.120.0130.00816.74
7.4.110.0060.01616.56
7.4.100.0130.01316.71
7.4.90.0070.01316.75
7.4.80.0180.00019.39
7.4.70.0120.00616.57
7.4.60.0140.00416.56
7.4.50.0060.00916.82
7.4.40.0100.01316.74
7.4.00.0070.01015.11
7.3.330.0000.00513.38
7.3.320.0050.00013.18
7.3.310.0070.00316.30
7.3.300.0040.00416.48
7.3.290.0020.00516.45
7.3.280.0060.01216.46
7.3.260.0170.00616.77
7.3.240.0140.00816.79
7.3.230.0170.00416.79
7.3.210.0070.02016.68
7.3.200.0070.01116.94
7.3.190.0130.01016.60
7.3.180.0150.00416.49
7.3.170.0120.00716.50
7.3.160.0110.01516.58
7.3.10.0070.00916.85
7.3.00.0080.00616.74
7.2.330.0100.01016.68
7.2.320.0140.01016.83
7.2.310.0150.00317.02
7.2.300.0090.00916.98
7.2.290.0090.00916.84
7.2.130.0150.00517.20
7.2.120.0180.00616.99
7.2.110.0130.00616.50
7.2.100.0230.00716.52
7.2.90.0100.00816.65
7.2.80.0080.00616.61
7.2.70.0260.00516.66
7.2.60.0250.00416.79
7.2.50.0110.00916.52
7.2.40.0260.00516.68
7.2.30.0150.00516.67
7.2.20.0150.00816.64
7.2.10.0180.00816.61
7.2.00.0100.00616.68
7.1.250.0070.00715.88
7.1.230.0950.00913.84
7.1.220.0120.00614.16
7.1.210.0110.00314.34
7.1.200.0560.00713.98
7.1.190.0100.00714.05
7.1.180.0710.00614.11
7.1.170.0120.00414.38
7.1.160.0800.00914.09
7.1.150.0000.01914.07
7.1.140.0140.00414.26
7.1.130.0170.00014.13
7.1.120.0700.00913.86
7.1.110.0080.01114.20
7.1.100.0600.00914.32
7.1.90.0070.01113.77
7.1.80.0160.01214.05
7.1.70.0620.00614.21
7.1.60.0390.00331.95
7.1.50.0530.01032.07
7.1.40.0240.01232.26
7.1.30.1310.01032.13
7.1.20.0700.01332.04
7.1.10.0930.00714.13
7.1.00.0290.01014.05
5.6.380.0120.00214.35

preferences:
48.51 ms | 400 KiB | 5 Q