3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone("Europe/Zurich"); $dt1 = new Datetime('2019-01-01', $tz); $dt2 = new Datetime('2019-05-01', $tz); echo 'EU/ZU : ' . $dt1->diff($dt2)->format('%a') . ' Days' . PHP_EOL; echo 'EU/ZU : ' . $dt1->diff($dt2)->format('%m') . ' Months' . PHP_EOL . PHP_EOL; $tz = new DateTimeZone("UTC"); $dt1 = new Datetime('2019-01-01', $tz); $dt2 = new Datetime('2019-05-01', $tz); echo 'UTC : ' . $dt1->diff($dt2)->format('%a') . ' Days' . PHP_EOL; echo 'UTC : ' . $dt1->diff($dt2)->format('%m') . ' Months' . PHP_EOL;

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.0.20.0130.00917.15
8.0.10.0150.00917.14
8.0.00.0130.01017.18
7.4.150.0120.01016.58
7.4.140.0120.01016.54
7.4.130.0130.00916.54
7.4.120.0130.01016.54
7.4.110.0130.00916.55
7.4.100.0120.01016.55
7.4.90.0130.00916.56
7.4.80.0130.01016.57
7.4.70.0120.00916.55
7.4.60.0120.00916.57
7.4.50.0130.00916.53
7.4.40.0110.01016.52
7.4.30.0130.00916.54
7.4.20.0120.00916.58
7.4.10.0120.00916.55
7.4.00.0110.00916.60
7.3.270.0130.00916.53
7.3.260.0120.00916.51
7.3.250.0130.00816.50
7.3.240.0120.01016.45
7.3.230.0130.00816.49
7.3.220.0120.01016.49
7.3.210.0130.00916.49
7.3.200.0120.00916.48
7.3.190.0130.00916.50
7.3.180.0120.00916.48
7.3.170.0130.00816.48
7.3.160.0130.00916.49
7.3.150.0120.00916.49
7.3.140.0130.00816.48
7.3.130.0120.00916.46
7.3.120.0130.00816.44
7.3.110.0120.01016.48
7.3.100.0120.00916.45
7.3.90.0120.00916.48
7.3.80.0130.00916.50
7.3.70.0130.00816.42
7.3.60.0110.01016.43
7.3.50.0140.00716.44
7.3.40.0130.00816.41
7.3.30.0120.00916.41
7.3.20.0130.01016.60
7.3.10.0150.00916.60
7.3.00.0150.00816.64
7.2.340.0200.01516.66
7.2.330.0220.01116.95
7.2.320.0160.01816.56
7.2.310.0260.00816.91
7.2.300.0230.01016.70
7.2.290.0180.01516.77
7.2.280.0210.01216.70
7.2.270.0240.01016.74
7.2.260.0210.01316.71
7.2.250.0220.01416.74
7.2.240.0220.01116.78
7.2.230.0270.00616.78
7.2.220.0240.00816.81
7.2.210.0240.00916.84
7.2.200.0270.00816.70
7.2.190.0240.01016.81
7.2.180.0230.01316.73
7.2.170.0230.01016.69
7.2.160.0200.01416.75
7.2.150.0220.01116.73
7.2.140.0260.01016.82
7.2.130.0220.01516.77
7.2.120.0320.00516.76
7.2.110.0250.00916.74
7.2.100.0260.00816.75
7.2.90.0270.01216.86
7.2.80.0270.01616.79
7.2.70.0240.01016.77
7.2.60.0240.01216.76
7.2.50.0260.01016.73
7.2.40.0280.01116.83
7.2.30.0250.00916.83
7.2.20.0240.01216.71
7.2.10.0220.01316.75
7.2.00.0230.01516.70
7.1.330.0200.01015.67
7.1.320.0250.00815.56
7.1.310.0310.00315.70
7.1.300.0230.00915.82
7.1.290.0590.01215.59
7.1.280.0420.00715.56
7.1.270.0240.01115.81
7.1.260.0190.01215.51
7.1.250.0220.00815.69
7.1.240.0220.00915.44
7.1.230.0230.01015.63
7.1.220.0160.01315.54
7.1.210.0260.01215.65
7.1.200.0250.01115.57
7.1.190.0280.00515.70
7.1.180.0200.00815.67
7.1.170.0180.01215.54
7.1.160.0270.00615.59
7.1.150.0230.00915.42
7.1.140.0260.00415.68
7.1.130.0340.01215.68
7.1.120.0210.01415.50
7.1.110.0270.00715.63
7.1.100.0220.01015.66
7.1.90.0230.01015.60
7.1.80.0260.00515.67
7.1.70.0230.01015.77
7.1.60.0340.00215.71
7.1.50.0220.00815.52
7.1.40.0250.00615.67
7.1.30.0240.00715.74
7.1.20.0190.01215.54
7.1.10.0220.00715.62
7.1.00.0250.00615.44
7.0.330.0210.00715.38
7.0.320.0240.00315.26
7.0.310.0180.01615.30
7.0.300.0190.01215.35
7.0.290.0180.01215.42
7.0.280.0270.00915.21
7.0.270.0370.01215.37
7.0.260.0180.01515.24
7.0.250.0230.01015.29
7.0.240.0220.01115.35
7.0.230.0200.01015.33
7.0.220.0230.00815.38
7.0.210.0210.01015.44
7.0.200.0190.01115.39
7.0.190.0400.01015.41
7.0.180.0420.00715.55
7.0.170.0250.00615.44
7.0.160.0210.00915.29
7.0.150.0210.00815.45
7.0.140.0240.00715.42
7.0.130.0220.00715.32
7.0.120.0140.01615.34
7.0.110.0200.01015.31
7.0.100.0200.01315.29
7.0.90.0270.00515.45
7.0.80.0280.00515.33
7.0.70.0180.01115.33
7.0.60.0210.00715.38
7.0.50.0190.01115.42
7.0.40.0380.00915.32
7.0.30.0280.00215.25
7.0.20.0250.00515.38
7.0.10.0530.00615.32
7.0.00.0200.00915.38
5.6.400.0180.01115.92
5.6.390.0150.01516.08
5.6.380.0210.01315.98
5.6.370.0220.01216.16
5.6.360.0200.01216.07
5.6.350.0220.01016.05
5.6.340.0240.00716.04
5.6.330.0190.01716.16
5.6.320.0210.01416.17
5.6.310.0250.00716.04
5.6.300.0220.01016.01
5.6.290.0230.00916.03
5.6.280.0220.01016.07
5.6.270.0220.00916.03
5.6.260.0230.01216.03
5.6.250.0160.01315.99
5.6.240.0220.01015.96
5.6.230.0220.01016.15
5.6.220.0210.01215.88
5.6.210.0220.01016.21
5.6.200.0150.01616.06
5.6.190.0210.01015.88
5.6.180.0200.01315.96
5.6.170.0200.01316.04
5.6.160.0270.00416.05
5.6.150.0220.01416.04
5.6.140.0160.01816.14
5.6.130.0230.01216.14
5.6.120.0140.01816.16
5.6.110.0280.01316.02
5.6.100.0300.00615.96
5.6.90.0180.01616.12
5.6.80.0210.01116.05
5.6.70.0240.01016.09
5.6.60.0290.00416.06
5.6.50.0190.01915.95
5.6.40.0120.01915.88
5.6.30.0220.01016.06
5.6.20.0160.01415.93
5.6.10.0240.01016.05
5.6.00.0140.01615.84
5.5.380.0210.01115.95
5.5.370.0220.01015.98
5.5.360.0210.01116.11
5.5.350.0220.01116.10
5.5.340.0200.01216.16
5.5.330.0230.01115.99
5.5.320.0190.01316.03
5.5.310.0220.01215.96
5.5.300.0190.01516.06
5.5.290.0310.00816.04
5.5.280.0190.01716.11
5.5.270.0200.01516.04
5.5.260.0220.01216.17
5.5.250.0250.01015.91
5.5.240.0180.00815.96
5.5.230.0180.01015.95
5.5.220.0180.01015.97
5.5.210.0220.01116.10
5.5.200.0220.00616.02
5.5.190.0210.01015.81
5.5.180.0110.01515.84
5.5.170.0180.01115.62
5.5.160.0190.00815.77
5.5.150.0160.01115.95
5.5.140.0170.00916.01
5.5.130.0170.01016.07
5.5.120.0190.00815.94
5.5.110.0150.01015.81
5.5.100.0150.01215.87
5.5.90.0200.00916.00
5.5.80.0180.01116.10
5.5.70.0170.01016.12
5.5.60.0180.01315.91
5.5.50.0250.00915.97
5.5.40.0180.01215.86
5.5.30.0170.01315.72
5.5.20.0230.00715.88
5.5.10.0160.01415.93
5.5.00.0230.00615.67
5.4.450.0240.00212.76
5.4.440.0150.01212.79
5.4.430.0210.00512.71
5.4.420.0160.00812.89
5.4.410.0180.01012.66
5.4.400.0190.00612.81
5.4.390.0190.00712.71
5.4.380.0200.00812.63
5.4.370.0170.01012.80
5.4.360.0160.00912.56
5.4.350.0150.00912.83
5.4.340.0200.00812.77
5.4.330.0140.00912.54
5.4.320.0200.00412.73
5.4.310.0170.00712.86
5.4.300.0200.00312.74
5.4.290.0170.00912.61
5.4.280.0150.00712.63
5.4.270.0150.00912.68
5.4.260.0160.00912.76
5.4.250.0200.00612.92
5.4.240.0180.00812.71
5.4.230.0180.00612.71
5.4.220.0210.00612.78
5.4.210.0160.00612.64
5.4.200.0170.00712.56
5.4.190.0230.00212.63
5.4.180.0180.00512.74
5.4.170.0190.00412.72
5.4.160.0210.00512.61
5.4.150.0170.00612.63
5.4.140.0140.00912.73
5.4.130.0140.00712.76
5.4.120.0140.01212.79
5.4.110.0170.01012.59
5.4.100.0170.00512.65
5.4.90.0130.01012.58
5.4.80.0200.00312.60
5.4.70.0170.00912.66
5.4.60.0180.00812.65
5.4.50.0170.00712.55
5.4.40.0130.01112.68
5.4.30.0170.00612.61
5.4.20.0190.00612.64
5.4.10.0170.00612.60
5.4.00.0090.01312.68
5.3.290.0190.00713.33
5.3.280.0200.00313.17
5.3.270.0150.00913.38
5.3.260.0160.01013.34
5.3.250.0230.00513.28
5.3.240.0170.00813.18
5.3.230.0150.01113.24
5.3.220.0170.00813.06
5.3.210.0160.01112.98
5.3.200.0150.01013.09
5.3.190.0190.00413.17
5.3.180.0160.01013.27
5.3.170.0170.01013.26
5.3.160.0160.00813.30
5.3.150.0120.01213.35
5.3.140.0160.01113.05
5.3.130.0190.00713.10
5.3.120.0130.01113.22
5.3.110.0200.00613.14
5.3.100.0180.00513.16
5.3.90.0180.00913.25
5.3.80.0170.00713.18
5.3.70.0200.00413.06
5.3.60.0120.01213.19
5.3.50.0130.00913.16
5.3.40.0130.01213.12
5.3.30.0140.01013.24
5.3.20.0120.01113.21
5.3.10.0150.00912.96
5.3.00.0200.00313.01
5.2.170.0100.01012.28
5.2.160.0110.00912.24
5.2.150.0130.00912.29
5.2.140.0110.00912.21
5.2.130.0100.01012.21
5.2.120.0100.00912.21
5.2.110.0140.00812.18
5.2.100.0120.00912.18
5.2.90.0170.00312.20
5.2.80.0110.01212.14
5.2.70.0160.00612.21
5.2.60.0140.00612.17
5.2.50.0150.00512.12
5.2.40.0160.00412.14
5.2.30.0150.00612.13
5.2.20.0140.00612.12
5.2.10.0140.01012.12
5.2.00.0130.00812.12
5.1.60.0110.00912.12
5.1.50.0110.00712.12
5.1.40.0100.00912.12
5.1.30.0110.00812.12
5.1.20.0150.00512.12
5.1.10.0130.00612.12
5.1.00.0120.00512.12
5.0.50.0120.00312.12
5.0.40.0120.00312.12
5.0.30.0110.00512.12
5.0.20.0110.00612.12
5.0.10.0120.00412.12
5.0.00.0080.00712.12
4.4.90.0100.00312.12
4.4.80.0020.00812.12
4.4.70.0060.00612.12
4.4.60.0050.00612.12
4.4.50.0050.00412.12
4.4.40.0050.00512.12
4.4.30.0100.00012.12
4.4.20.0100.00212.12
4.4.10.0070.00312.12
4.4.00.0080.00312.12
4.3.110.0080.00112.12
4.3.100.0060.00412.12
4.3.90.0090.00112.12
4.3.80.0080.00312.12
4.3.70.0080.00212.12
4.3.60.0050.00412.12
4.3.50.0080.00312.12
4.3.40.0080.00112.12
4.3.30.0050.00312.12
4.3.20.0070.00112.12
4.3.10.0080.00112.12
4.3.00.0040.00412.12