3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Berlin'); $date = new DateTime(); $date->setDate(2015, 10, 25); $date->setTime(1, 30, 0); $date2 = clone $date; // Add two hours $date->add(new DateInterval('PT2H')); // Add two times one hour $date2->add(new DateInterval('PT1H')); $date2->add(new DateInterval('PT1H')); echo "Spot the difference: ".$date->format(DateTime::ATOM)." <---> ".$date2->format(DateTime::ATOM)."\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.3.60.0070.01116.50
8.3.50.0110.00822.05
8.3.40.0040.01118.76
8.3.30.0040.01118.93
8.3.20.0070.00020.20
8.3.10.0040.00423.36
8.3.00.0040.00419.51
8.2.180.0040.01416.88
8.2.170.0140.00322.96
8.2.160.0070.00721.97
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00517.75
8.2.120.0070.00026.35
8.2.110.0030.00722.06
8.2.100.0060.00618.03
8.2.90.0000.00819.35
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0050.00517.93
8.2.50.0060.00318.07
8.2.40.0000.00719.46
8.2.30.0050.00220.66
8.2.20.0100.00017.87
8.2.10.0030.00517.95
8.2.00.0040.00418.10
8.1.280.0090.00625.92
8.1.270.0060.00623.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00022.54
8.1.230.0040.00717.65
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.00817.48
8.1.190.0080.00017.38
8.1.180.0050.00318.10
8.1.170.0040.00418.71
8.1.160.0070.00022.07
8.1.150.0000.00719.06
8.1.140.0000.00819.64
8.1.130.0000.00717.75
8.1.120.0040.00417.69
8.1.110.0020.00517.50
8.1.100.0040.00417.55
8.1.90.0040.00417.57
8.1.80.0030.00517.68
8.1.70.0000.00717.59
8.1.60.0000.00817.75
8.1.50.0000.00817.65
8.1.40.0040.00417.63
8.1.30.0060.00317.64
8.1.20.0040.00417.75
8.1.10.0030.00517.64
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0080.00016.88
8.0.280.0030.00318.57
8.0.270.0040.00417.37
8.0.260.0030.00317.33
8.0.250.0000.00717.11
8.0.240.0000.00817.01
8.0.230.0030.00517.08
8.0.220.0070.00017.08
8.0.210.0070.00017.00
8.0.200.0040.00417.07
8.0.190.0000.00717.14
8.0.180.0000.00717.07
8.0.170.0060.00316.99
8.0.160.0080.00017.11
8.0.150.0040.00417.13
8.0.140.0040.00417.08
8.0.130.0000.00613.50
8.0.120.0000.00917.00
8.0.110.0070.00017.14
8.0.100.0080.00017.04
8.0.90.0050.00216.98
8.0.80.0140.00317.13
8.0.70.0000.00717.01
8.0.60.0070.00016.99
8.0.50.0040.00416.91
8.0.30.0100.00917.11
8.0.20.0140.00617.41
8.0.10.0040.00417.20
8.0.00.0080.01016.80
7.4.330.0030.00316.89
7.4.320.0040.00416.64
7.4.300.0060.00016.78
7.4.290.0020.00516.74
7.4.280.0000.00916.70
7.4.270.0000.00916.72
7.4.260.0000.00716.71
7.4.250.0070.00016.67
7.4.240.0040.00416.60
7.4.230.0070.00016.59
7.4.220.0080.01216.60
7.4.210.0100.00716.71
7.4.200.0040.00416.62
7.4.160.0060.01016.50
7.4.150.0090.00917.40
7.4.140.0140.00717.86
7.4.130.0100.00816.66
7.4.120.0100.00816.50
7.4.110.0070.01616.70
7.4.100.0060.01216.67
7.4.90.0090.00916.46
7.4.80.0090.00619.39
7.4.70.0090.00916.60
7.4.60.0060.00916.54
7.4.50.0120.00616.66
7.4.40.0100.00716.55
7.4.30.0060.01216.69
7.4.10.0070.01115.34
7.4.00.0060.01015.07
7.3.330.0030.00313.24
7.3.320.0000.00513.31
7.3.310.0030.00316.37
7.3.300.0030.00316.50
7.3.290.0110.00516.34
7.3.280.0110.00716.39
7.3.270.0100.00717.40
7.3.260.0030.01616.56
7.3.250.0130.00516.54
7.3.240.0110.00516.57
7.3.230.0120.00916.44
7.3.210.0070.01116.70
7.3.200.0060.01016.82
7.3.190.0150.00316.70
7.3.180.0100.00616.55
7.3.170.0030.01316.65
7.3.160.0070.01116.54
7.3.130.0030.01215.20
7.3.120.0030.01515.03
7.3.110.0080.01014.84
7.3.100.0030.00814.97
7.3.90.0060.01114.80
7.3.80.0060.00615.12
7.3.70.0100.00614.95
7.3.60.0050.01114.78
7.3.50.0040.01115.04
7.3.40.0100.00514.85
7.3.30.0080.00814.70
7.3.20.0090.00716.78
7.3.10.0070.00716.95
7.3.00.0080.00316.68
7.2.330.0120.00616.65
7.2.320.0110.00616.96
7.2.310.0110.00617.07
7.2.300.0160.00016.71
7.2.290.0090.00916.64
7.2.260.0130.00315.11
7.2.250.0050.01215.43
7.2.240.0060.01215.27
7.2.230.0110.00615.37
7.2.220.0100.00315.19
7.2.210.0030.01315.40
7.2.200.0060.00615.22
7.2.190.0050.01015.22
7.2.180.0040.00715.06
7.2.170.0030.01115.23
7.2.160.0070.01015.30
7.2.150.0110.00417.13
7.2.140.0070.00717.09
7.2.130.0040.01116.88
7.2.120.0080.00416.83
7.2.110.0120.00717.07
7.2.100.0120.00417.13
7.2.90.0040.01117.18
7.2.80.0040.01016.93
7.2.70.0030.00917.26
7.2.60.0050.00717.13
7.2.50.0000.01417.17
7.2.40.0000.01517.25
7.2.30.0060.00617.18
7.2.20.0030.01317.13
7.2.10.0090.00417.21
7.2.00.0050.00918.23
7.1.330.0090.00315.99
7.1.320.0050.00715.86
7.1.310.0090.00416.08
7.1.300.0080.00815.76
7.1.290.0020.01016.06
7.1.280.0080.00915.75
7.1.270.0070.00815.91
7.1.260.0030.00815.81
7.1.250.0080.00815.81
7.1.240.0040.01115.89
7.1.230.0070.00715.93
7.1.220.0040.01015.89
7.1.210.0030.00716.05
7.1.200.0100.00515.78
7.1.190.0040.00815.87
7.1.180.0090.00315.69
7.1.170.0060.00615.70
7.1.160.0000.00916.00
7.1.150.0070.00315.93
7.1.140.0100.00016.00
7.1.130.0070.01015.74
7.1.120.0100.00315.92
7.1.110.0040.00715.79
7.1.100.0020.01016.99
7.1.90.0060.00615.89
7.1.80.0030.01016.02
7.1.70.0030.00916.59
7.1.60.0110.01017.71
7.1.50.0110.01025.22
7.1.40.0060.00615.95
7.1.30.0000.01415.86
7.1.20.0060.00615.78
7.1.10.0060.00915.72
7.1.00.0080.03819.05
7.0.330.0070.00415.67
7.0.320.0030.01015.45
7.0.310.0090.00615.65
7.0.300.0090.00615.71
7.0.290.0000.01315.57
7.0.280.0030.00915.52
7.0.270.0040.00415.46
7.0.260.0060.00315.57
7.0.250.0030.00515.61
7.0.240.0040.00715.61
7.0.230.0080.00415.27
7.0.220.0000.01615.43
7.0.210.0040.01115.60
7.0.200.0050.00516.02
7.0.190.0080.00315.70
7.0.180.0080.00415.55
7.0.170.0100.00715.55
7.0.160.0060.00615.66
7.0.150.0060.00815.57
7.0.140.0030.01115.62
7.0.130.0040.01115.34
7.0.120.0120.00015.82
7.0.110.0030.00615.36
7.0.100.0070.00715.43
7.0.90.0100.00315.38
7.0.80.0060.01015.41
7.0.70.0130.00015.68
7.0.60.0100.03817.80
7.0.50.0050.04516.64
7.0.40.0050.03416.90
7.0.30.0200.03616.93
7.0.20.0120.02716.86
7.0.10.0100.03816.88
7.0.00.0070.03416.67
5.6.400.0100.00714.16
5.6.390.0130.00314.41
5.6.380.0090.00314.77
5.6.370.0070.00314.26
5.6.360.0000.01114.61
5.6.350.0140.00014.40
5.6.340.0030.01014.43
5.6.330.0000.01414.66
5.6.320.0000.01414.41
5.6.310.0000.01614.30
5.6.300.0030.01414.59
5.6.290.0100.00314.38
5.6.280.0020.03817.55
5.6.270.0030.01114.44
5.6.260.0080.00614.34
5.6.250.0030.00714.38
5.6.240.0040.01514.44
5.6.230.0070.00714.30
5.6.220.0030.00714.24
5.6.210.0050.04717.62
5.6.200.0050.03116.23
5.6.190.0080.04017.30
5.6.180.0200.04017.41
5.6.170.0130.04417.39
5.6.160.0070.03317.39
5.6.150.0150.03616.27
5.6.140.0010.02416.24
5.6.130.0080.04516.26
5.6.120.0030.02717.64
5.6.110.0060.03317.82
5.6.100.0050.03817.81
5.6.90.0080.02517.70
5.6.80.0090.04217.49
5.6.70.0090.00614.24
5.6.60.0030.01014.20
5.6.50.0060.00914.24
5.6.40.0000.01714.18
5.6.30.0090.00314.30
5.6.20.0090.00614.33
5.6.10.0070.01014.13
5.6.00.0000.01514.55
5.5.380.0080.00814.39
5.5.370.0040.01114.40
5.5.360.0030.01214.07
5.5.350.1550.03317.19
5.5.340.0060.03316.07
5.5.330.0070.03017.54
5.5.320.0080.02417.25
5.5.310.0200.01817.40
5.5.300.0090.02616.19
5.5.290.0020.03016.16
5.5.280.0030.04017.50
5.5.270.0100.04317.48
5.5.260.0100.04517.65
5.5.250.0050.04917.49
5.5.240.0170.03917.18
5.5.230.0130.00314.23
5.5.220.0030.01013.95
5.5.210.0110.00814.41
5.5.200.0120.00614.41
5.5.190.0030.01014.06
5.5.180.0120.00014.37
5.5.170.0070.01114.16
5.5.160.0030.00914.30
5.5.150.0060.01014.64
5.5.140.0100.00714.36
5.5.130.0130.00614.19
5.5.120.0080.00814.15
5.5.110.0070.00714.00
5.5.100.0070.01314.42
5.5.90.0030.01314.14
5.5.80.0090.00614.25
5.5.70.0070.00714.27
5.5.60.0040.01514.45
5.5.50.0070.01113.95
5.5.40.0100.00714.30
5.5.30.0030.01614.12
5.5.20.0120.00414.33
5.5.10.0060.01114.09
5.5.00.0000.01514.49

preferences:
35.26 ms | 401 KiB | 5 Q