3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone('America/Chicago'); // A timezone that has DST $five_hours_interval = new DateInterval('PT5H'); $date = new DateTime("2020-03-08 00:00:00", $tz); // goes forward at 2am echo $date->format('c') . "\n"; // Add five hours and subtract 5 hours. The $newDate should then equal the date. $five_hours_later = $date->add($five_hours_interval); $newDate = $five_hours_later->sub($five_hours_interval); echo $newDate->format('c');

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.0110.00416.63
8.3.50.0160.00618.18
8.3.40.0110.00322.13
8.3.30.0110.00418.77
8.3.20.0040.00421.79
8.3.10.0060.00322.08
8.3.00.0040.00422.43
8.2.180.0130.00616.75
8.2.170.0140.00722.96
8.2.160.0070.00719.29
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00026.16
8.2.110.0060.00320.88
8.2.100.0040.00719.77
8.2.90.0000.00817.75
8.2.80.0040.00417.97
8.2.70.0030.00517.75
8.2.60.0060.00317.75
8.2.50.0000.00918.05
8.2.40.0050.00318.28
8.2.30.0000.00717.95
8.2.20.0000.00818.08
8.2.10.0030.00621.07
8.2.00.0000.00719.12
8.1.280.0110.00425.92
8.1.270.0080.00022.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0040.00722.70
8.1.220.0060.00317.76
8.1.210.0000.00818.77
8.1.200.0030.01017.47
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00717.62
8.1.160.0030.00518.86
8.1.150.0050.00218.92
8.1.140.0040.00418.99
8.1.130.0030.00320.05
8.1.120.0030.00317.70
8.1.110.0030.00517.62
8.1.100.0000.00717.68
8.1.90.0040.00417.61
8.1.80.0070.00417.70
8.1.70.0000.00717.70
8.1.60.0000.00917.59
8.1.50.0060.00317.57
8.1.40.0000.00817.55
8.1.30.0060.00317.76
8.1.20.0090.00017.80
8.1.10.0050.00317.69
8.1.00.0040.00417.46
8.0.300.0080.00019.65
8.0.290.0050.00516.75
8.0.280.0000.00718.43
8.0.270.0000.00718.22
8.0.260.0000.00820.07
8.0.250.0070.00017.13
8.0.240.0040.00417.18
8.0.230.0070.00017.18
8.0.220.0030.00317.11
8.0.210.0030.00317.03
8.0.200.0070.00017.12
8.0.190.0040.00417.04
8.0.180.0030.00517.00
8.0.170.0050.00317.09
8.0.160.0000.00817.12
8.0.150.0040.00416.95
8.0.140.0000.00817.08
8.0.130.0050.00013.42
8.0.120.0000.00817.08
8.0.110.0040.00417.11
8.0.100.0040.00416.89
8.0.90.0000.00917.16
8.0.80.0100.00617.10
8.0.70.0030.00517.11
8.0.60.0000.00716.98
8.0.50.0040.00416.92
8.0.30.0120.00917.00
8.0.20.0080.01117.18
8.0.10.0000.00817.01
8.0.00.0110.00716.77
7.4.330.0030.00315.55
7.4.320.0060.00016.57
7.4.300.0000.00816.60
7.4.290.0000.00716.47
7.4.280.0000.00816.62
7.4.270.0030.00316.67
7.4.260.0030.00313.24
7.4.250.0030.00316.64
7.4.240.0030.00416.71
7.4.230.0030.00316.58
7.4.220.0030.00316.57
7.4.210.0030.01316.66
7.4.200.0000.00716.66
7.4.130.0090.00916.67
7.4.120.0100.00716.54
7.4.110.0130.00316.51
7.4.100.0090.00916.71
7.4.90.0080.00916.71
7.4.80.0040.01619.39
7.4.70.0100.00716.57
7.4.60.0110.00516.74
7.4.50.0050.00516.45
7.4.40.0060.01216.49
7.4.30.0130.01016.78
7.4.20.0000.01816.51
7.4.10.0060.01116.50
7.4.00.0060.01216.52
7.3.330.0030.00316.45
7.3.320.0000.00513.25
7.3.310.0040.00416.44
7.3.300.0070.00016.36
7.3.290.0100.00616.38
7.3.280.0040.01116.30
7.3.260.0000.01816.55
7.3.240.0090.00816.54
7.3.230.0030.01416.51
7.3.210.0070.01016.54
7.3.200.0030.01416.50
7.3.190.0100.01316.45
7.3.180.0100.00616.74
7.3.170.0130.01016.41
7.3.160.0110.01116.61
7.3.150.0060.01216.70
7.3.140.0030.01416.39
7.3.130.0130.00716.73
7.3.120.0110.00516.38
7.3.110.0130.00316.63
7.3.100.0070.01016.39
7.3.90.0110.00716.43
7.3.80.0100.00716.64
7.3.70.0080.00816.38
7.3.60.0130.00316.31
7.3.50.0030.01316.40
7.3.40.0100.00716.36
7.3.30.0090.00616.32
7.3.20.0140.00416.42
7.3.10.0140.00316.49
7.3.00.0090.00916.36
7.2.330.0100.00716.68
7.2.310.0090.00616.60
7.2.300.0060.01216.84
7.2.290.0140.00616.59
7.2.280.0110.00616.86
7.2.270.0080.00816.80
7.2.260.0090.01216.56
7.2.250.0040.01516.94
7.2.240.0130.00416.88
7.2.230.0070.01116.74
7.2.220.0110.00616.77
7.2.210.0100.00716.96
7.2.200.0080.01116.70
7.2.190.0060.01216.70
7.2.180.0090.00916.61
7.2.170.0110.00616.70
7.2.160.0130.00416.75
7.2.150.0060.01216.54
7.2.140.0130.01316.70
7.2.130.0090.00916.78
7.2.120.0130.00316.80
7.2.110.0130.00416.84
7.2.100.0000.01816.79
7.2.90.0140.00416.68
7.2.80.0040.01516.60
7.2.70.0150.01016.72
7.2.60.0100.01216.75
7.2.50.0110.01216.61
7.2.40.0130.00916.78
7.2.30.0190.00616.84
7.2.20.0180.00616.80
7.2.10.0120.01216.77
7.2.00.0090.00916.79

preferences:
55.98 ms | 400 KiB | 5 Q