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("2019-11-03 00:00:00", $tz); // goes backward 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.0140.00716.63
8.3.50.0100.01018.16
8.3.40.0080.01221.83
8.3.30.0070.00718.85
8.3.20.0030.00521.77
8.3.10.0000.00821.86
8.3.00.0060.00322.52
8.2.180.0270.00016.63
8.2.170.0060.00922.96
8.2.160.0100.00319.34
8.2.150.0030.00524.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0000.00922.07
8.2.100.0060.00617.84
8.2.90.0040.00417.88
8.2.80.0030.00618.16
8.2.70.0000.00817.75
8.2.60.0030.00617.75
8.2.50.0080.00018.05
8.2.40.0060.00318.28
8.2.30.0020.00518.02
8.2.20.0000.00718.18
8.2.10.0000.00820.94
8.2.00.0000.00719.25
8.1.280.0000.01625.92
8.1.270.0080.00022.07
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.76
8.1.230.0080.00321.03
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0090.00317.48
8.1.190.0040.00417.38
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0000.00818.97
8.1.150.0000.00719.00
8.1.140.0040.00419.00
8.1.130.0000.00820.06
8.1.120.0040.00317.70
8.1.110.0070.00017.64
8.1.100.0040.00417.65
8.1.90.0080.00017.68
8.1.80.0030.00717.70
8.1.70.0040.00417.62
8.1.60.0090.00017.76
8.1.50.0000.00817.66
8.1.40.0000.00717.62
8.1.30.0040.00417.82
8.1.20.0000.00817.79
8.1.10.0000.00717.70
8.1.00.0040.00417.46
8.0.300.0040.00419.73
8.0.290.0040.00416.75
8.0.280.0030.00318.40
8.0.270.0030.00318.19
8.0.260.0000.00821.82
8.0.250.0030.00317.05
8.0.240.0070.00017.19
8.0.230.0040.00417.08
8.0.220.0030.00317.11
8.0.210.0000.00717.08
8.0.200.0030.00317.11
8.0.190.0000.00717.11
8.0.180.0050.00317.09
8.0.170.0040.00417.03
8.0.160.0000.00817.04
8.0.150.0070.00016.99
8.0.140.0000.00817.06
8.0.130.0000.00513.51
8.0.120.0050.00217.09
8.0.110.0000.00716.96
8.0.100.0040.00416.97
8.0.90.0080.00017.09
8.0.80.0110.00417.07
8.0.70.0000.00716.87
8.0.60.0040.00416.91
8.0.50.0000.00716.80
8.0.30.0090.01217.16
8.0.20.0110.00817.37
8.0.10.0040.00417.10
8.0.00.0070.01617.04
7.4.330.0000.00515.55
7.4.320.0040.00416.43
7.4.300.0030.00616.63
7.4.290.0070.00016.49
7.4.280.0000.00816.66
7.4.270.0070.00016.48
7.4.260.0030.00313.41
7.4.250.0070.00016.68
7.4.240.0070.00016.53
7.4.230.0000.00816.41
7.4.220.0000.00716.63
7.4.210.0000.01516.63
7.4.200.0030.00416.75
7.4.130.0080.01016.75
7.4.120.0100.00716.61
7.4.110.0100.00616.56
7.4.100.0110.00516.68
7.4.90.0120.00816.70
7.4.80.0070.01019.39
7.4.70.0130.00316.48
7.4.60.0090.00616.62
7.4.50.0120.00816.48
7.4.40.0120.00616.71
7.4.30.0130.00316.42
7.4.20.0060.01016.63
7.4.10.0030.01416.74
7.4.00.0040.01416.63
7.3.330.0000.00716.25
7.3.320.0000.00513.14
7.3.310.0030.00316.41
7.3.300.0040.00416.39
7.3.290.0120.00516.34
7.3.280.0110.00316.45
7.3.260.0060.01616.60
7.3.230.0130.01016.64
7.3.210.0070.01016.36
7.3.200.0190.00316.49
7.3.190.0110.00816.40
7.3.180.0060.01016.64
7.3.170.0020.02116.38
7.3.160.0030.01416.61
7.3.150.0100.00716.42
7.3.140.0140.00716.68
7.3.130.0060.01216.59
7.3.120.0100.00716.38
7.3.110.0090.01216.29
7.3.100.0090.01216.38
7.3.90.0100.01016.47
7.3.80.0060.01016.75
7.3.70.0090.00616.43
7.3.60.0030.01316.43
7.3.50.0180.00416.51
7.3.40.0100.00716.33
7.3.30.0100.00716.45
7.3.20.0120.00616.40
7.3.10.0070.01016.73
7.3.00.0090.00916.50
7.2.330.0130.01016.65
7.2.310.0060.00916.88
7.2.300.0030.01416.84
7.2.290.0070.01016.63
7.2.280.0110.01116.79
7.2.270.0030.01316.62
7.2.260.0090.00916.87
7.2.250.0090.00916.46
7.2.240.0100.00716.80
7.2.230.0130.01016.57
7.2.220.0090.00916.76
7.2.210.0140.00316.89
7.2.200.0090.00916.77
7.2.190.0030.01416.64
7.2.180.0070.01016.72
7.2.170.0090.00916.75
7.2.160.0110.00716.66
7.2.150.0160.01016.95
7.2.140.0160.00316.65
7.2.130.0090.01416.92
7.2.120.0060.01616.84
7.2.110.0130.00916.78
7.2.100.0070.01016.85
7.2.90.0160.00316.82
7.2.80.0030.01316.76
7.2.70.0080.00916.74
7.2.60.0100.01016.61
7.2.50.0070.01016.65
7.2.40.0070.01116.66
7.2.30.0120.00616.82
7.2.20.0090.00916.98
7.2.10.0160.00816.80
7.2.00.0110.00816.79

preferences:
64.08 ms | 401 KiB | 5 Q