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; $local = $start->getTimezone(); $utc = new DateTimeZone('UTC'); foreach ($increments as $increment => $expected_string) { echo '>>> ' . $increment . PHP_EOL; $expected_end = new DateTime($expected_string); $actual_end = clone $start; $actual_end->setTimezone($utc); $actual_end->modify($increment); $actual_end->setTimezone($local); 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.0170.00318.56
8.3.50.0140.00622.11
8.3.40.0110.00418.84
8.3.30.0090.00618.75
8.3.20.0050.00220.29
8.3.10.0000.00820.25
8.3.00.0040.00421.90
8.2.180.0110.00416.88
8.2.170.0120.00322.96
8.2.160.0140.00320.53
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0000.01119.49
8.2.100.0120.00017.84
8.2.90.0040.00422.51
8.2.80.0030.00617.97
8.2.70.0000.00917.93
8.2.60.0040.00418.22
8.2.50.0000.00818.16
8.2.40.0030.00517.88
8.2.30.0040.00417.88
8.2.20.0000.00718.09
8.2.10.0040.00418.27
8.2.00.0000.00818.45
8.1.280.0040.01125.92
8.1.270.0070.00023.97
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00621.14
8.1.230.0060.00620.93
8.1.220.0040.00417.91
8.1.210.0030.00518.81
8.1.200.0030.00617.47
8.1.190.0050.00317.35
8.1.180.0060.00318.10
8.1.170.0070.00518.84
8.1.160.0000.00719.04
8.1.150.0040.00718.86
8.1.140.0040.00419.65
8.1.130.0030.00319.15
8.1.120.0040.00417.70
8.1.110.0030.00417.63
8.1.100.0040.00417.73
8.1.90.0000.00917.64
8.1.80.0000.00717.63
8.1.70.0030.00317.79
8.1.60.0090.00017.79
8.1.50.0000.00817.66
8.1.40.0000.00917.66
8.1.30.0030.00617.82
8.1.20.0080.00017.94
8.1.10.0040.00417.80
8.1.00.0000.00817.79
8.0.300.0000.00820.29
8.0.290.0040.00417.00
8.0.280.0040.00418.21
8.0.270.0000.00717.10
8.0.260.0040.00417.42
8.0.250.0070.00017.27
8.0.240.0030.00917.22
8.0.230.0030.00317.11
8.0.220.0040.00417.13
8.0.210.0000.00717.20
8.0.200.0030.00317.23
8.0.190.0040.00417.23
8.0.180.0040.00417.09
8.0.170.0040.00417.14
8.0.160.0000.00717.20
8.0.150.0030.00317.16
8.0.140.0080.00017.13
8.0.130.0000.00913.60
8.0.120.0090.00017.03
8.0.110.0040.00417.21
8.0.100.0040.00417.22
8.0.90.0040.00417.24
8.0.80.0060.01417.09
8.0.70.0040.00416.99
8.0.60.0040.00417.21
8.0.50.0050.00217.12
8.0.30.0120.00617.28
8.0.20.0120.01017.42
8.0.10.0030.00517.35
8.0.00.0090.00917.05
7.4.330.0000.00515.55
7.4.320.0020.00516.88
7.4.300.0000.00616.83
7.4.290.0070.00016.73
7.4.280.0060.00316.71
7.4.270.0000.00716.73
7.4.260.0000.00816.70
7.4.250.0070.00016.63
7.4.240.0000.00716.82
7.4.230.0000.00716.76
7.4.220.0070.01016.67
7.4.210.0110.00516.82
7.4.200.0030.00516.70
7.4.160.0080.00816.78
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0080.01216.66
7.4.120.0110.00716.71
7.4.110.0130.00916.77
7.4.100.0100.00716.68
7.4.90.0030.01416.81
7.4.80.0090.00919.39
7.4.70.0110.00716.84
7.4.60.0100.00616.70
7.4.50.0120.00316.77
7.4.40.0040.01416.68
7.4.30.0070.01016.86
7.4.00.0050.01215.24
7.3.330.0000.00613.48
7.3.320.0000.00613.46
7.3.310.0030.00316.38
7.3.300.0070.00016.47
7.3.290.0070.00816.49
7.3.280.0070.00816.52
7.3.270.0140.00317.40
7.3.260.0150.00616.54
7.3.250.0100.00716.64
7.3.240.0130.00816.59
7.3.230.0090.01016.51
7.3.210.0030.01416.62
7.3.200.0100.00616.78
7.3.190.0130.00716.64
7.3.180.0100.00516.86
7.3.170.0120.00416.62
7.3.160.0030.01316.71
7.3.120.0100.00715.09
7.3.110.0040.00814.98
7.3.100.0060.01015.16
7.3.90.0070.00314.93
7.3.80.0080.00714.88
7.3.70.0060.00615.14
7.3.60.0060.00815.16
7.3.50.0070.00715.18
7.3.40.0050.01114.95
7.3.30.0090.00415.09
7.3.20.0040.00916.97
7.3.10.0020.01016.71
7.3.00.0060.00816.89
7.2.330.0120.01217.03
7.2.320.0080.01116.88
7.2.310.0030.01316.82
7.2.300.0100.01016.74
7.2.290.0070.01116.85
7.2.250.0090.00915.28
7.2.240.0110.00615.26
7.2.230.0080.00715.38
7.2.220.0090.00615.39
7.2.210.0110.00515.27
7.2.200.0080.00615.23
7.2.190.0070.00515.42
7.2.180.0020.01115.24
7.2.170.0070.00915.41
7.2.160.0070.00715.28
7.2.150.0060.00917.07
7.2.140.0050.00517.18
7.2.130.0030.01017.17
7.2.120.0030.00917.11
7.2.110.0030.01217.19
7.2.100.0070.01016.90
7.2.90.0030.00917.11
7.2.80.0060.00917.25
7.2.70.0070.00717.12
7.2.60.0130.01317.25
7.2.50.0000.01116.97
7.2.40.0030.01017.21
7.2.30.0100.00717.25
7.2.20.0090.00317.19
7.2.10.0030.01617.29
7.2.00.0040.00817.29
7.1.330.0040.01215.76
7.1.320.0010.01416.04
7.1.310.0040.00915.95
7.1.300.0020.01315.90
7.1.290.0040.01015.90
7.1.280.0030.01016.07
7.1.270.0080.00515.91
7.1.260.0030.01015.91
7.1.250.0120.00016.08
7.1.200.0070.00716.08
7.1.70.0000.00717.30
7.1.60.0030.01017.55
7.1.30.7500.08036.46
7.1.20.6000.06336.44
7.1.10.6570.07020.54
7.1.00.4630.05320.59
7.0.200.0080.00816.64
7.0.170.6130.05720.09
7.0.160.5970.06720.00
7.0.150.4870.06720.11
7.0.140.4770.07020.10
7.0.130.5030.05720.04
7.0.120.4670.05020.25
7.0.110.3230.06319.98
7.0.100.4570.08320.03
7.0.90.4200.07020.09
7.0.80.3800.06720.05
7.0.70.3930.05320.07
7.0.60.3370.06319.95
7.0.50.2570.07320.05
7.0.40.4370.06720.18
7.0.30.3700.07319.92
7.0.20.3030.06719.95
7.0.10.3670.07720.05
7.0.00.2870.09020.08

preferences:
32.99 ms | 401 KiB | 5 Q