3v4l.org

run code in 300+ PHP versions simultaneously
<?php // @see https://stackoverflow.com/questions/77131068/how-to-retain-the-time-zone-info-when-truncating-a-timestamp-with-time-zone date_default_timezone_set('UTC'); $dates = [ '1999-12-31 20:59:59+00', '1999-12-31 20:59:59', '2000-01-01 07:29:59', '1999-12-31 20:00:00+00', '1999-12-31 20:00:00', '2000-01-01 07:00:00', '2000-01-01 07:00:00 +00', '2000-01-01 07:00:00 Australia/Adelaide' ]; foreach ($dates as $dateString) { $date = new \DateTimeImmutable($dateString); echo $dateString."\n-> ".$date->format('r')."\n\n"; }

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.5.10.0100.00916.78
8.5.00.0130.00820.13
8.4.150.0010.00114.05
8.4.140.0130.00917.67
8.4.130.0090.01117.74
8.4.120.0090.01023.88
8.4.110.0070.00322.51
8.4.100.0130.00518.83
8.4.90.0050.00418.01
8.4.80.0130.00517.87
8.4.70.0110.01018.16
8.4.60.0120.00918.93
8.4.50.0040.00422.60
8.4.40.0170.00317.79
8.4.30.0120.00620.57
8.4.20.0070.01319.52
8.4.10.0030.00619.30
8.3.280.0150.00618.84
8.3.270.0130.00816.74
8.3.260.0140.00916.61
8.3.250.0090.01019.21
8.3.240.0080.00717.07
8.3.230.0080.00416.69
8.3.220.0120.00718.66
8.3.210.0140.00516.73
8.3.200.0050.00416.68
8.3.190.0110.00917.04
8.3.180.0040.00418.78
8.3.170.0060.00317.21
8.3.160.0090.00918.39
8.3.150.0070.01120.88
8.3.140.0130.00620.81
8.3.130.0090.00018.63
8.3.120.0060.00320.53
8.3.110.0070.00320.94
8.3.100.0040.00424.06
8.3.90.0130.00726.77
8.3.80.0000.01018.68
8.3.70.0130.01016.63
8.3.60.0140.00718.68
8.3.50.0090.00916.84
8.3.40.0040.01123.70
8.3.30.0120.00320.92
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00820.41
8.2.280.0120.00718.64
8.2.270.0120.00617.50
8.2.260.0070.00018.58
8.2.250.0040.01518.65
8.2.240.0000.00918.82
8.2.230.0030.00622.58
8.2.220.0000.00937.54
8.2.210.0110.00326.77
8.2.200.0100.00016.75
8.2.190.0140.00416.88
8.2.180.0120.00316.63
8.2.170.0150.00019.09
8.2.160.0070.01122.96
8.2.150.0050.00225.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.60
8.2.110.0060.00322.28
8.2.100.0240.00318.44
8.1.330.0120.00621.93
8.1.320.0140.00617.86
8.1.310.0080.00016.71
8.1.300.0080.00818.05
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0220.00318.80
8.1.230.0060.00318.61

preferences:
39.22 ms | 403 KiB | 5 Q