3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTime('2020-01-01 23:59:40'); $b = new DateTimeImmutable('2020-01-01 23:59:40'); var_dump($a, $b); $a->add(new DateInterval('P1D')); $c = $b->add(new DateInterval('P1D')); DateTimeImmutable::fromMutable($a); var_dump($a, $b, $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.0070.01418.27
8.3.50.0170.00318.15
8.3.40.0070.00718.92
8.3.30.0070.01018.95
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.180.0030.01725.92
8.2.170.0000.01419.08
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00626.16
8.2.110.0040.00421.00
8.2.100.0040.00818.03
8.2.90.0000.00817.88
8.2.80.0030.00519.03
8.2.70.0060.00917.63
8.2.60.0040.00417.63
8.2.50.0000.00818.07
8.2.40.0040.00418.00
8.2.30.0070.00018.01
8.2.20.0030.00518.13
8.2.10.0040.00419.11
8.2.00.0000.00719.21
8.1.270.0050.00223.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0080.00422.08
8.1.230.0110.00020.95
8.1.220.0030.00618.71
8.1.210.0040.00418.77
8.1.200.0050.00517.47
8.1.190.0040.00417.65
8.1.180.0060.00318.10
8.1.170.0000.00918.52
8.1.160.0020.00518.77
8.1.150.0050.00318.94
8.1.140.0080.00318.89
8.1.130.0000.00720.19
8.1.120.0070.00017.68
8.1.110.0000.00817.57
8.1.100.0030.00617.48
8.1.90.0080.00017.60
8.1.80.0000.00817.48
8.1.70.0030.00317.47
8.1.60.0050.00517.67
8.1.50.0080.00017.67
8.1.40.0060.00717.62
8.1.30.0000.00917.73
8.1.20.0040.00417.78
8.1.10.0040.00417.74
8.1.00.0040.00417.69
8.0.300.0020.00519.89
8.0.290.0030.00616.88
8.0.280.0040.00418.51
8.0.270.0070.00018.13
8.0.260.0000.00718.52
8.0.250.0070.00017.12
8.0.240.0030.00317.20
8.0.230.0070.00017.17
8.0.220.0030.00316.96
8.0.210.0000.00717.08
8.0.200.0000.00617.11
8.0.190.0000.00817.17
8.0.180.0040.00417.11
8.0.170.0040.00416.95
8.0.160.0040.00417.17
8.0.150.0020.00516.95
8.0.140.0040.00417.07
8.0.130.0000.00513.47
8.0.120.0040.00417.06
8.0.110.0040.00417.11
8.0.100.0040.00416.95
8.0.90.0070.00017.09
8.0.80.0090.01217.03
8.0.70.0170.00317.09
8.0.60.0100.01016.94
8.0.50.0130.00717.07
8.0.30.0070.01417.02
8.0.20.0030.01817.13
8.0.10.0000.01617.20
8.0.00.0090.00617.21
7.4.330.0050.00015.55
7.4.320.0000.00816.70
7.4.300.0030.00316.58
7.4.290.0030.00316.67
7.4.280.0070.00016.54
7.4.270.0000.00716.71
7.4.260.0000.00613.36
7.4.250.0030.00316.72
7.4.240.0030.00616.63
7.4.230.0000.00816.53
7.4.220.0070.00016.77
7.4.210.0110.01116.63
7.4.200.0120.00316.64
7.4.190.0120.00316.65
7.4.180.0090.00616.89
7.4.160.0030.01616.68
7.4.150.0130.00716.75
7.4.140.0170.00316.70
7.4.130.0150.00616.61
7.4.120.0090.01216.64
7.4.110.0140.00716.66
7.4.100.0100.01016.61
7.4.90.0040.01316.59
7.4.80.0130.00716.59
7.4.70.0100.01016.69
7.4.60.0030.01316.63
7.4.50.0080.01116.70
7.4.40.0070.00716.55
7.4.30.0040.01216.53
7.4.20.0100.00616.54
7.4.10.0090.00616.46
7.4.00.0080.00616.74
7.3.330.0000.00716.45
7.3.320.0020.00313.25
7.3.310.0040.00416.39
7.3.300.0000.00716.39
7.3.290.0030.01016.43
7.3.280.0070.00716.51
7.3.270.0100.00316.41
7.3.260.0070.00716.51
7.3.250.0030.01116.44
7.3.240.0100.01016.49
7.3.230.0070.00716.51
7.3.220.0040.01116.36
7.3.210.0090.00616.36
7.3.200.0040.01116.34
7.3.190.0100.01016.41
7.3.180.0140.00616.34
7.3.170.0000.01416.47
7.3.160.0030.01016.46
7.3.150.0000.01416.40
7.3.140.0100.01016.43
7.3.130.0110.00416.50
7.3.120.0130.00716.37
7.3.110.0110.00816.29
7.3.100.0060.01316.34
7.3.90.0110.00816.58
7.3.80.0060.01316.27
7.3.70.0140.00616.36
7.3.60.0090.00616.39
7.3.50.0060.01216.55
7.3.40.0100.00516.43
7.3.30.0070.00816.47
7.3.20.0070.00716.44
7.3.10.0130.00716.38
7.3.00.0070.01016.43

preferences:
42.14 ms | 400 KiB | 5 Q