3v4l.org

run code in 500+ PHP versions simultaneously
<?php class MyDateTimeImmutableMidnightUTC extends \DateTimeImmutable { public function __construct(string $datetime) { parent::__construct($datetime, new \DateTimeZone('UTC')); $time = $this->format('H:i:s'); if ($time !== '00:00:00') { throw new RuntimeException("Midnight UTC datetime called with a non-midnight time! datetime: $datetime time: $time"); } } } new MyDateTimeImmutableMidnightUTC('2000-01-01 00:00'); new MyDateTimeImmutableMidnightUTC('2000-01-01 00:10');

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.70.0090.00816.92
8.5.60.0070.00717.17
8.5.50.0110.00717.14
8.5.30.0100.00817.51
8.5.20.0110.00619.42
8.5.10.0110.00720.27
8.5.00.0140.00620.23
8.4.180.0110.01222.09
8.4.170.0110.01123.88
8.4.160.0150.00823.30
8.4.150.0070.00616.98
8.4.140.0120.01117.92
8.4.130.0090.01118.25
8.4.120.0120.00822.37
8.4.110.0120.00722.53
8.4.100.0120.00918.88
8.4.90.0090.00720.66
8.4.80.0160.00618.75
8.4.70.0060.00317.93
8.4.60.0060.00318.92
8.4.50.0090.00819.89
8.4.40.0100.00518.92
8.4.30.0120.00918.75
8.4.20.0180.00718.00
8.4.10.0100.01022.12
8.3.300.0150.00620.87
8.3.290.0120.00820.66
8.3.280.0140.00618.30
8.3.270.0130.00616.85
8.3.260.0150.00416.61
8.3.250.0130.00518.95
8.3.240.0110.00816.52
8.3.230.0090.00816.65
8.3.220.0060.00218.83
8.3.210.0090.00516.90
8.3.200.0050.00416.88
8.3.190.0080.01017.22
8.3.180.0120.00816.53
8.3.170.0120.00618.76
8.3.160.0000.00816.88
8.3.150.0130.00620.82
8.3.140.0000.00818.91
8.3.130.0090.00016.99
8.3.120.0060.00318.77
8.3.110.0080.00020.94
8.3.100.0130.00724.06
8.3.90.0000.00826.77
8.3.80.0000.00916.75
8.3.70.0000.01816.71
8.3.60.0120.00918.55
8.3.50.0110.00720.29
8.3.40.0160.00419.92
8.3.30.0080.00818.85
8.3.20.0080.00024.18
8.3.10.0050.00324.66
8.3.00.0070.00726.16
8.2.300.0090.01120.30
8.2.290.0080.01120.70
8.2.280.0030.00518.32
8.2.270.0060.01217.23
8.2.260.0050.00316.73
8.2.250.0060.00317.13
8.2.240.0080.00816.90
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0080.00826.77
8.2.200.0030.00618.41
8.2.190.0070.01116.88
8.2.180.0080.00825.92
8.2.170.0090.00919.26
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00320.77
8.2.110.0090.00020.35
8.2.100.0060.00618.03
8.2.90.0040.00417.88
8.2.80.0080.00019.08
8.2.70.0040.00417.75
8.2.60.0050.00617.93
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0040.00418.08
8.2.20.0070.00019.31
8.2.10.0070.00018.08
8.2.00.0000.00719.19
8.1.340.0090.00721.56
8.1.330.0090.01021.81
8.1.320.0140.00816.32
8.1.310.0120.00616.68
8.1.300.0030.00618.22
8.1.290.0060.00330.84
8.1.280.0040.01125.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0110.00820.60
8.1.230.0040.00817.83
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0000.01017.61
8.1.190.0050.00317.48
8.1.180.0050.00318.10
8.1.170.0050.00318.62
8.1.160.0000.00819.07
8.1.150.0040.00418.82
8.1.140.0060.00317.59
8.1.130.0070.00020.79
8.1.120.0070.00017.52
8.1.110.0040.00417.50
8.1.100.0000.00717.55
8.1.90.0080.00417.49
8.1.80.0000.01417.50
8.1.70.0140.00217.55
8.1.60.0160.00217.55
8.1.50.0160.00317.63
8.1.40.0090.00917.42
8.1.30.0150.00017.61
8.1.20.0130.00417.71
8.1.10.0100.00417.48
8.1.00.0110.00417.47
8.0.300.0040.00418.87
8.0.290.0000.00816.88
8.0.280.0000.00718.50
8.0.270.0040.00416.94
8.0.260.0000.00618.38
8.0.250.0090.00017.05
8.0.240.0060.00317.05
8.0.230.0030.00317.07
8.0.220.0030.01017.08
8.0.210.0050.01016.98
8.0.200.0100.00317.13
8.0.190.0110.00416.99
8.0.180.0060.01016.98
8.0.170.0110.00416.98
8.0.160.0080.00817.11
8.0.150.0120.00417.03
8.0.140.0120.00417.09
8.0.130.0100.00716.99
8.0.120.0110.00517.07
8.0.110.0090.00617.10
8.0.100.0090.00617.07
8.0.90.0150.00017.13
8.0.80.0090.00617.12
8.0.70.0160.00017.02
8.0.60.0050.01017.12
8.0.50.0110.00416.95
8.0.30.0140.00016.98
8.0.20.0140.00017.04
8.0.10.0120.00517.25
7.4.330.0050.00015.55
7.4.320.0030.00316.63
7.4.300.0110.00416.69
7.4.290.0030.01016.56
7.4.280.0150.00316.55
7.4.270.0120.00416.62
7.4.260.0090.00616.64
7.4.250.0100.00516.68
7.4.240.0130.00016.42
7.4.230.0150.00016.51
7.4.220.0120.00216.55
7.4.210.0090.00516.56
7.4.200.0140.00016.64
7.4.190.0120.00316.53
7.4.180.0070.00716.68
7.4.160.0160.00016.55
7.4.150.0110.00316.61
7.4.140.0120.00216.56
7.4.130.0050.01016.52
7.4.120.0100.00516.48
7.4.110.0090.00616.42
7.4.100.0030.01016.31
7.4.90.0050.00816.37
7.4.80.0080.00516.44
7.4.70.0090.00516.36
7.4.60.0110.00416.52
7.4.50.0120.00016.38
7.4.40.0090.00416.52
7.4.30.0080.00316.50
7.4.20.0130.00016.35
7.4.10.0070.00716.48
7.4.00.0070.00716.48

preferences:
58.11 ms | 1301 KiB | 5 Q