3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$tz = new DateTimeZone('Europe/Amsterdam'); foreach (DateTimeZone::listIdentifiers() as $tz) { $now = new DateTime('2015-10-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 9, $diff->format('%m')); $now = new DateTime('2015-09-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 8, $diff->format('%m')); $now = new DateTime('2015-11-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 10, $diff->format('%m')); }

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.0110.00717.00
8.3.50.0120.00921.23
8.3.40.0120.00319.34
8.3.30.0110.00419.09
8.3.20.0070.00020.29
8.3.10.0000.00823.71
8.3.00.0040.00819.91
8.2.180.0130.01016.84
8.2.170.0120.00322.96
8.2.160.0110.00620.56
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00018.13
8.2.110.0030.00722.33
8.2.100.0060.00718.25
8.2.90.0040.00419.47
8.2.80.0000.00818.00
8.2.70.0040.00418.13
8.2.60.0030.00618.18
8.2.50.0050.00318.13
8.2.40.0000.00819.50
8.2.30.0040.00418.34
8.2.20.0090.00018.28
8.2.10.0080.00018.61
8.2.00.0070.00018.36
8.1.280.0090.01225.92
8.1.270.0040.01122.10
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00722.91
8.1.230.0120.00017.73
8.1.220.0000.00818.04
8.1.210.0000.00818.77
8.1.200.0070.00717.75
8.1.190.0030.00617.50
8.1.180.0000.00818.10
8.1.170.0030.00618.78
8.1.160.0030.00521.99
8.1.150.0040.00419.23
8.1.140.0060.00317.79
8.1.130.0080.00017.95
8.1.120.0050.00217.77
8.1.110.0050.00517.71
8.1.100.0040.00417.80
8.1.90.0070.00017.82
8.1.80.0060.00317.70
8.1.70.0030.00317.87
8.1.60.0050.00517.86
8.1.50.0000.00817.70
8.1.40.0060.00317.76
8.1.30.0060.00317.93
8.1.20.0000.00817.90
8.1.10.0060.00317.88
8.1.00.0050.00317.81
8.0.300.0000.00818.77
8.0.290.0000.00717.63
8.0.280.0030.00519.17
8.0.270.0030.00317.86
8.0.260.0030.00319.09
8.0.250.0000.00817.77
8.0.240.0080.00017.77
8.0.230.0040.00417.82
8.0.220.0000.00817.74
8.0.210.0000.00717.74
8.0.200.0040.00417.84
8.0.190.0100.00017.69
8.0.180.0050.00317.66
8.0.170.0050.00317.70
8.0.160.0040.00417.77
8.0.150.0050.00217.60
8.0.140.0040.00417.71
8.0.130.0050.00214.17
8.0.120.0040.00417.76
8.0.110.0000.00717.71
8.0.100.0000.00717.71
8.0.90.0070.00017.82
8.0.80.0100.00717.64
8.0.70.0000.00717.73
8.0.60.0050.00317.56
8.0.50.0050.00317.57
8.0.30.0090.00917.80
8.0.20.0130.00817.80
8.0.10.0040.00417.93
8.0.00.0080.01017.51
7.4.330.0050.00015.57
7.4.320.0040.00417.09
7.4.300.0000.00717.11
7.4.290.0070.00017.06
7.4.280.0030.00717.21
7.4.270.0040.00417.25
7.4.260.0070.00017.14
7.4.250.0080.00017.16
7.4.240.0020.00517.10
7.4.230.0030.00516.91
7.4.220.0090.00917.04
7.4.210.0030.01317.05
7.4.200.0050.00217.12
7.4.160.0090.00917.05
7.4.150.0090.00917.40
7.4.140.0070.01417.86
7.4.130.0070.01217.24
7.4.120.0130.00617.34
7.4.110.0100.00617.20
7.4.100.0070.01017.13
7.4.90.0120.00617.45
7.4.80.0070.01119.39
7.4.70.0130.00317.27
7.4.60.0170.00317.25
7.4.50.0000.00917.34
7.4.40.0100.00617.46
7.4.30.0070.01717.47
7.4.00.0000.01415.67
7.3.330.0030.00313.83
7.3.320.0030.00313.72
7.3.310.0000.00716.80
7.3.300.0000.00717.01
7.3.290.0070.01016.95
7.3.280.0120.00817.05
7.3.270.0030.01417.40
7.3.260.0090.01117.21
7.3.250.0140.00517.05
7.3.240.0090.01217.25
7.3.230.0160.00816.96
7.3.210.0130.00316.95
7.3.200.0030.01417.17
7.3.190.0160.00617.18
7.3.180.0110.00417.12
7.3.170.0030.01317.23
7.3.160.0070.01017.09
7.3.10.0030.01017.29
7.3.00.0030.00617.19
7.2.330.0090.00917.07
7.2.320.0170.00317.20
7.2.310.0110.00717.07
7.2.300.0130.00917.57
7.2.290.0100.00717.53
7.2.130.0070.00717.73
7.2.120.0000.00917.57
7.2.110.0100.00717.57
7.2.100.0120.00317.45
7.2.90.0070.00317.62
7.2.80.0040.00817.74
7.2.70.0090.00617.48
7.2.60.0050.01117.47
7.2.50.0130.00317.71
7.2.40.0070.00317.59
7.2.30.0070.01117.63
7.2.20.0110.00417.29
7.2.10.0060.00917.57
7.2.00.0060.00818.73
7.1.250.0100.00316.30
7.1.200.0130.00716.01
7.1.100.0060.00618.86
7.1.70.0000.00817.49
7.1.60.0040.01519.27
7.1.50.0030.01217.75
7.1.00.0000.08022.57
7.0.200.0450.00015.43
7.0.60.0070.07719.80
7.0.50.0070.06717.89
7.0.40.0070.09020.30
7.0.30.0370.05720.02
7.0.20.0300.06720.16
7.0.10.0170.04720.33
7.0.00.0030.08319.99
5.6.280.0030.06720.88
5.6.210.0100.03320.50
5.6.200.0000.04318.18
5.6.190.0130.08020.46
5.6.180.0230.05020.51
5.6.170.0170.04320.82
5.6.160.0070.07720.45
5.6.150.0000.04318.27
5.6.140.0170.04318.29
5.6.130.0030.09318.14
5.6.120.0070.08021.18
5.6.110.0100.06721.12
5.6.100.0070.07720.99
5.6.90.0070.03721.06
5.6.80.0100.05020.39
5.6.70.0070.05320.41
5.5.350.0170.07720.36
5.5.340.0070.08018.04
5.5.330.0100.08720.43
5.5.320.0270.04320.35
5.5.310.0300.08020.34
5.5.300.0070.08017.95
5.5.290.0000.04317.96
5.5.280.0070.08020.91
5.5.270.0030.05020.98
5.5.260.0030.05320.71
5.5.250.0070.08320.71
5.5.240.4230.03320.19
5.4.450.0200.05719.58
5.4.440.0270.05719.58
5.4.430.0070.07319.52
5.4.420.0130.06319.43
5.4.410.0270.05019.42
5.4.400.0230.05719.31
5.4.390.0270.05019.15
5.4.380.0100.07318.88
5.4.370.0270.04719.12
5.4.360.0130.06019.15
5.4.350.0100.06319.27
5.4.340.0230.05319.28
5.4.320.0200.05718.98
5.4.310.0130.06318.97
5.4.300.0100.06319.01
5.4.290.0200.05719.12
5.4.280.0300.04719.26
5.4.270.0100.06319.05
5.4.260.0170.05319.14
5.4.250.0170.06018.83
5.4.240.0230.05319.00
5.4.230.0300.05319.25
5.4.220.0170.08719.00
5.4.210.0230.07719.38
5.4.200.0230.05719.13
5.4.190.0100.06719.27
5.4.180.0300.04719.29
5.4.170.0270.05019.29
5.4.160.0200.05318.96
5.4.150.0170.06318.82
5.4.140.0200.05716.53
5.4.130.0230.04716.55
5.4.120.0230.07016.37
5.4.110.0230.04716.70
5.4.100.0100.06316.57
5.4.90.0230.05716.65
5.4.80.0200.04716.45
5.4.70.0200.06316.40
5.4.60.0200.04316.52
5.4.50.0100.06316.47
5.4.40.0000.07316.57
5.4.30.0030.06316.32
5.4.20.0200.03716.48

preferences:
57.03 ms | 401 KiB | 5 Q