3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DatePeriodExample extends \DatePeriod { public static function test(): self { return new self(new \DateTimeImmutable('2022-01-01'), new \DateInterval('P1M'), new \DateTimeImmutable('2022-01-31')); } } echo get_class(DatePeriodExample::test());

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.4.120.0140.00524.31
8.4.110.0120.00822.53
8.4.100.0140.00619.04
8.4.90.0120.00819.13
8.4.80.0060.00418.84
8.4.70.0060.00319.07
8.4.60.0080.01218.76
8.4.50.0080.01017.70
8.4.40.0120.00618.05
8.4.30.0150.00420.36
8.4.20.0180.00418.21
8.4.10.0000.00919.51
8.3.250.0090.00919.11
8.3.240.0120.00717.11
8.3.230.0090.01016.55
8.3.220.0050.00319.11
8.3.210.0070.01116.81
8.3.200.0110.00816.46
8.3.190.0050.00319.16
8.3.180.0140.00416.85
8.3.170.0180.00016.75
8.3.160.0120.00616.72
8.3.150.0070.01117.25
8.3.140.0150.00418.75
8.3.130.0060.00318.57
8.3.120.0100.00718.94
8.3.110.0060.00320.94
8.3.100.0000.00924.06
8.3.90.0040.00426.77
8.3.80.0040.00416.38
8.3.70.0210.00016.63
8.3.60.0070.01418.41
8.3.50.0110.01120.24
8.3.40.0100.00718.84
8.3.30.0110.00418.76
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.290.0110.00720.67
8.2.280.0040.00419.94
8.2.270.0150.00316.69
8.2.260.0040.00418.88
8.2.250.0070.01116.66
8.2.240.0040.00418.88
8.2.230.0070.01122.58
8.2.220.0060.00937.54
8.2.210.0000.01126.77
8.2.200.0030.00616.88
8.2.190.0140.00316.58
8.2.180.0100.01025.92
8.2.170.0090.00619.12
8.2.160.0100.01022.96
8.2.150.0070.00725.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00321.97
8.2.110.0080.00420.97
8.2.100.0060.00617.84
8.2.90.0030.00618.03
8.2.80.0050.00318.97
8.2.70.0040.00417.74
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0000.00817.70
8.2.20.0040.00420.40
8.2.10.0040.00417.71
8.2.00.0000.00719.24
8.1.330.0090.01021.79
8.1.320.0130.00615.93
8.1.310.0100.00716.63
8.1.300.0090.00618.19
8.1.290.0060.00330.84
8.1.280.0150.00325.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0050.00322.14
8.1.230.0080.00420.93
8.1.220.0040.00417.79
8.1.210.0050.00318.79
8.1.200.0100.00017.35
8.1.190.0000.00817.36
8.1.180.0050.00318.10
8.1.170.0000.00918.64
8.1.160.0000.00718.89
8.1.150.0000.00718.71
8.1.140.0000.00717.46
8.1.130.0070.00020.23
8.1.120.0000.00717.39
8.1.110.0050.00317.43
8.1.100.0030.00617.42
8.1.90.0000.00817.54
8.1.80.0080.00017.54
8.1.70.0030.00317.41
8.1.60.0040.00417.57
8.1.50.0030.00617.57
8.1.40.0040.00417.61
8.1.30.0090.00017.76
8.1.20.0000.01217.59
8.1.10.0150.00317.50
8.1.00.0250.00017.63
8.0.300.0040.00420.16
8.0.290.0000.00716.88
8.0.280.0080.00018.46
8.0.270.0070.00016.93
8.0.260.0030.00318.51
8.0.250.0000.00717.05
8.0.240.0000.00717.05
8.0.230.0080.00016.99
8.0.220.0000.00716.92
8.0.210.0030.00417.07
8.0.200.0000.00717.09
8.0.190.0000.00817.09
8.0.180.0070.00417.00
8.0.170.0030.00616.96
8.0.160.0080.00017.02
8.0.150.0070.00416.92
8.0.140.0120.00216.95
8.0.130.0040.00816.80
8.0.120.0120.00617.01
8.0.110.0190.00016.95
8.0.100.0150.00616.98
8.0.90.0140.00616.88
8.0.80.0120.00816.96
8.0.70.0150.00516.92
8.0.60.0080.01117.00
8.0.50.0180.00016.96
8.0.30.0110.01116.94
8.0.20.0160.00316.93
8.0.10.0110.00817.11
7.4.330.0000.00515.55
7.4.320.0030.00316.52
7.4.300.0000.00616.72
7.4.290.0040.00416.55
7.4.280.0040.00316.68
7.4.270.0000.00716.52
7.4.260.0170.00416.54
7.4.250.0130.00816.57
7.4.240.0180.00416.55
7.4.230.0150.00916.53
7.4.220.0170.00016.57
7.4.210.0110.00816.67
7.4.200.0110.00716.53
7.4.190.0140.00316.74
7.4.180.0120.00616.54
7.4.160.0100.00516.55
7.4.150.0120.00616.59
7.4.140.0110.00316.38
7.4.130.0040.01216.52
7.4.120.0120.00616.40
7.4.110.0180.00016.51
7.4.100.0030.01016.51
7.4.90.0190.00016.57
7.4.80.0100.01016.43
7.4.70.0170.00316.54
7.4.60.0170.00316.52
7.4.50.0120.00816.51
7.4.40.0070.01016.52
7.4.30.0070.01116.59
7.4.20.0180.00016.50
7.4.10.0100.00716.59
7.4.00.0130.00516.62

preferences:
28.29 ms | 403 KiB | 5 Q