3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Madrid'); $start = new DateTime('2017-03-26 01:59:00'); $increments = array( '+60 minutes' => '2017-03-26 03:59:00', '+61 minutes' => '2017-03-26 04:00:00', ); echo 'Start: ' . $start->format('r') . PHP_EOL; foreach ($increments as $increment => $expected_string) { echo '>>> ' . $increment . PHP_EOL; $expected_end = new DateTime($expected_string); $actual_end = clone $start; $actual_end->modify($increment); echo 'Expected end: ' . $expected_end->format('r') . PHP_EOL; echo 'Actual end: ' . $actual_end->format('r') . PHP_EOL; echo ($expected_end->format('c')===$actual_end->format('c') ? 'OK' : 'ERROR') . PHP_EOL; echo 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.60.0070.00716.49
8.3.50.0100.01221.33
8.3.40.0060.01018.77
8.3.30.0040.01118.84
8.3.20.0000.00720.16
8.3.10.0080.00020.31
8.3.00.0070.00021.95
8.2.180.0040.01118.66
8.2.170.0070.00722.96
8.2.160.0130.00320.57
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00618.97
8.2.110.0100.00722.43
8.2.100.0090.00318.16
8.2.90.0040.00419.22
8.2.80.0080.00017.97
8.2.70.0030.00617.61
8.2.60.0030.00618.05
8.2.50.0050.00318.10
8.2.40.0080.00020.55
8.2.30.0050.00219.25
8.2.20.0040.00418.07
8.2.10.0000.00818.12
8.2.00.0070.00018.49
8.1.280.0110.01125.92
8.1.270.0040.00423.95
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01019.38
8.1.230.0070.00317.89
8.1.220.0070.00317.79
8.1.210.0040.00418.77
8.1.200.0000.01117.72
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0040.00418.75
8.1.160.0040.00418.93
8.1.150.0040.00420.32
8.1.140.0030.00519.71
8.1.130.0030.00319.21
8.1.120.0000.00717.71
8.1.110.0050.00217.60
8.1.100.0030.00517.57
8.1.90.0040.00417.77
8.1.80.0040.00417.72
8.1.70.0040.00417.54
8.1.60.0050.00317.84
8.1.50.0000.00717.65
8.1.40.0060.00317.76
8.1.30.0040.00417.81
8.1.20.0040.00417.82
8.1.10.0090.00017.70
8.1.00.0040.00417.66
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0000.00718.50
8.0.270.0000.00717.44
8.0.260.0060.00017.40
8.0.250.0030.00317.19
8.0.240.0130.00017.21
8.0.230.0040.00217.13
8.0.220.0080.00017.13
8.0.210.0000.00717.20
8.0.200.0030.00317.18
8.0.190.0040.00417.11
8.0.180.0040.00417.15
8.0.170.0000.00717.08
8.0.160.0050.00317.14
8.0.150.0080.00017.20
8.0.140.0070.00017.07
8.0.130.0030.00613.55
8.0.120.0040.00417.21
8.0.110.0000.00817.20
8.0.100.0080.00016.95
8.0.90.0040.00416.97
8.0.80.0080.00717.06
8.0.70.0070.00017.22
8.0.60.0040.00417.15
8.0.50.0000.00717.09
8.0.30.0090.00717.11
8.0.20.0140.01017.42
8.0.10.0070.00017.29
8.0.00.0150.00417.09
7.4.330.0000.00515.55
7.4.320.0000.00816.67
7.4.300.0000.00616.81
7.4.290.0030.00316.84
7.4.280.0040.00416.79
7.4.270.0070.00016.71
7.4.260.0070.00316.70
7.4.250.0030.00316.68
7.4.240.0000.00716.83
7.4.230.0030.00316.52
7.4.220.0090.01216.77
7.4.210.0030.01016.67
7.4.200.0030.00316.78
7.4.160.0140.00316.60
7.4.150.0110.00717.40
7.4.140.0090.01217.86
7.4.130.0100.01016.74
7.4.120.0080.01116.67
7.4.110.0130.00316.61
7.4.100.0130.00316.60
7.4.90.0110.00616.70
7.4.80.0060.01219.39
7.4.70.0070.01016.84
7.4.60.0160.00016.69
7.4.50.0000.01216.79
7.4.40.0100.00616.55
7.4.30.0060.00916.81
7.4.00.0060.00915.11
7.3.330.0060.00013.36
7.3.320.0050.00013.45
7.3.310.0040.00416.46
7.3.300.0030.00316.46
7.3.290.0060.00816.48
7.3.280.0100.00716.47
7.3.270.0190.00417.40
7.3.260.0110.01116.62
7.3.250.0140.00616.65
7.3.240.0130.00416.71
7.3.230.0040.01316.50
7.3.210.0140.00316.88
7.3.200.0070.01316.50
7.3.190.0120.00616.77
7.3.180.0060.01016.60
7.3.170.0090.00616.63
7.3.160.0060.00916.79
7.2.330.0100.01016.80
7.2.320.0140.00317.07
7.2.310.0060.01117.03
7.2.300.0200.00316.86
7.2.290.0170.00816.73
7.2.60.0070.00717.27
7.2.50.0040.01216.82
7.1.200.0060.00615.92
7.1.70.0040.00417.15
7.1.60.0040.00817.14
7.1.30.0230.07336.38
7.1.20.0300.06036.48
7.1.10.2100.07720.36
7.1.00.0130.08020.47
7.0.200.0080.00816.83
7.0.170.0200.06020.01
7.0.160.1730.06320.02
7.0.150.2700.07720.01
7.0.140.0300.05720.04
7.0.130.2770.06320.12
7.0.120.0070.07020.06
7.0.110.1630.05720.00
7.0.100.0170.07020.06
7.0.90.1830.06320.08
7.0.80.0030.07320.13
7.0.70.0170.05020.04
7.0.60.0070.06020.10
7.0.50.1670.06320.00
7.0.40.2470.07020.05
7.0.30.3070.08320.02
7.0.20.0170.07020.07
7.0.10.2900.07020.18
7.0.00.0070.07720.13

preferences:
52.58 ms | 401 KiB | 5 Q