3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = '2000-01-25'; $date2 = '2010-02-20'; $ts1 = strtotime($date1); $ts2 = strtotime($date2); $year1 = date('Y', $ts1); $year2 = date('Y', $ts2); $month1 = date('m', $ts1); $month2 = date('m', $ts2); $diff = (($year2 - $year1) * 12) + ($month2 - $month1);

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.70.0100.00618.29
8.3.60.0100.00318.55
8.3.50.0070.01122.05
8.3.40.0210.00018.96
8.3.30.0110.00319.09
8.3.20.0040.00420.20
8.3.10.0080.00021.85
8.3.00.0040.00419.21
8.2.180.0090.00618.25
8.2.170.0070.01022.96
8.2.160.0060.00922.08
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0030.00619.62
8.2.110.0070.00320.99
8.2.100.0080.00418.03
8.2.90.0000.00818.03
8.2.80.0000.00917.97
8.2.70.0000.00917.88
8.2.60.0050.00318.04
8.2.50.0080.00018.07
8.2.40.0060.00319.95
8.2.30.0030.00718.18
8.2.20.0000.00717.93
8.2.10.0040.00418.16
8.2.00.0000.00717.90
8.1.280.0190.00325.92
8.1.270.0080.00018.78
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00622.08
8.1.230.0100.00020.99
8.1.220.0030.00617.79
8.1.210.0040.00418.93
8.1.200.0030.00617.35
8.1.190.0040.00417.38
8.1.180.0040.00418.10
8.1.170.0060.00318.78
8.1.160.0040.00421.87
8.1.150.0050.00218.77
8.1.140.0000.00717.62
8.1.130.0030.00317.88
8.1.120.0000.00717.62
8.1.110.0060.00617.48
8.1.100.0060.00517.58
8.1.90.0050.00517.51
8.1.80.0060.00817.52
8.1.70.0080.00517.56
8.1.60.0060.00917.58
8.1.50.0090.00617.55
8.1.40.0090.00617.53
8.1.30.0100.00517.70
8.1.20.0110.00317.66
8.1.10.0100.00517.54
8.1.00.0080.00717.62
8.0.300.0000.00820.02
8.0.290.0000.00816.75
8.0.280.0000.00718.50
8.0.270.0040.00417.32
8.0.260.0000.00617.33
8.0.250.0040.00417.06
8.0.240.0060.00417.13
8.0.230.0050.00617.06
8.0.220.0070.00617.08
8.0.210.0060.00517.00
8.0.200.0050.00417.08
8.0.190.0080.00317.04
8.0.180.0080.00417.05
8.0.170.0100.00217.09
8.0.160.0070.00517.05
8.0.150.0080.00516.89
8.0.140.0090.00416.95
8.0.130.0070.00615.74
8.0.120.0090.00417.00
8.0.110.0100.00217.02
8.0.100.0050.00816.99
8.0.90.0080.00417.04
8.0.80.0120.00517.00
8.0.70.0080.00516.94
8.0.60.0030.00916.99
8.0.50.0070.00616.96
8.0.30.0110.00817.08
8.0.20.0130.00517.20
8.0.10.0120.00417.16
8.0.00.0100.00717.00
7.4.330.0000.00515.03
7.4.320.0050.00716.53
7.4.300.0100.00416.54
7.4.290.0090.00416.60
7.4.280.0090.00316.45
7.4.270.0080.00416.63
7.4.260.0090.00416.48
7.4.250.0120.00116.56
7.4.240.0050.00516.64
7.4.230.0090.00516.53
7.4.220.0090.00516.57
7.4.210.0080.00516.52
7.4.200.0080.00416.49
7.4.190.0050.00916.63
7.4.180.0090.00616.68
7.4.160.0070.00816.60
7.4.150.0130.00316.74
7.4.140.0110.00617.08
7.4.130.0090.00816.54
7.4.120.0100.00516.57
7.4.110.0070.00916.63
7.4.100.0090.00616.46
7.4.90.0080.00516.58
7.4.80.0080.00617.25
7.4.70.0120.00416.49
7.4.60.0070.00716.51
7.4.50.0090.00616.51
7.4.40.0120.00716.43
7.4.30.0110.00616.55
7.4.20.0110.00516.39
7.4.10.0070.00816.34
7.4.00.0080.00716.16
7.3.330.0110.00215.32
7.3.320.0070.00515.32
7.3.310.0110.00216.26
7.3.300.0080.00416.24
7.3.290.0070.00816.38
7.3.280.0100.00716.38
7.3.270.0120.00416.62
7.3.260.0120.00516.41
7.3.250.0100.00716.53
7.3.240.0100.00616.51
7.3.230.0110.00616.43
7.3.220.0020.01316.45
7.3.210.0080.00716.46
7.3.200.0120.00417.17
7.3.190.0120.00316.41
7.3.180.0090.00716.45
7.3.170.0100.00816.34
7.3.160.0130.00516.33
7.3.150.0100.00616.31
7.3.140.0110.00616.42
7.3.130.0090.00816.49
7.3.120.0090.00516.44
7.3.110.0140.00316.26
7.3.100.0110.00516.42
7.3.90.0110.00516.56
7.3.80.0160.00116.33
7.3.70.0090.00716.47
7.3.60.0120.00416.34
7.3.50.0100.00616.45
7.3.40.0110.00516.51
7.3.30.0130.00416.42
7.3.20.0130.00516.95
7.3.10.0230.00217.06
7.3.00.0130.00517.04
7.2.340.0140.00516.55
7.2.330.0130.00516.48
7.2.320.0130.00716.48
7.2.310.0110.00816.55
7.2.300.0140.00716.60
7.2.290.0120.00816.46
7.2.280.0120.00616.36
7.2.270.0150.00416.60
7.2.260.0140.00516.52
7.2.250.0150.00316.50
7.2.240.0120.00816.50
7.2.230.0110.00816.61
7.2.220.0120.00616.52
7.2.210.0150.00316.47
7.2.200.0150.00416.59
7.2.190.0160.00316.59
7.2.180.0120.00716.48
7.2.170.0130.00616.56
7.2.160.0120.00716.68
7.2.150.0140.00617.32
7.2.140.0120.00917.14
7.2.130.0220.00517.34
7.2.120.0230.00616.71
7.2.110.0160.00916.68
7.2.100.0210.00716.70
7.2.90.0200.00816.69
7.2.80.0170.01016.61
7.2.70.0250.00916.64
7.2.60.0260.00516.66
7.2.50.0190.00816.67
7.2.40.0300.00616.89
7.2.30.0170.00816.75
7.2.20.0180.01016.78
7.2.10.0210.00816.67
7.2.00.0110.00817.22
7.1.330.0100.00816.25
7.1.320.0240.00516.34
7.1.310.0100.00616.31
7.1.300.0150.00516.29
7.1.290.0170.00116.08
7.1.280.0130.00516.19
7.1.270.0140.00516.29
7.1.260.0110.00616.26
7.1.250.0130.00616.17
7.1.240.0210.00315.58
7.1.230.0180.00415.62
7.1.220.0160.00515.61
7.1.210.0240.00515.57
7.1.200.0160.00815.61
7.1.190.0180.00615.59
7.1.180.0230.00415.66
7.1.170.0180.00515.77
7.1.160.0210.00615.58
7.1.150.0180.00915.61
7.1.140.0150.00815.67
7.1.130.0220.00615.63
7.1.120.0220.00215.58
7.1.110.0170.00715.70
7.1.100.0240.00816.16
7.1.90.0350.00415.56
7.1.80.0160.01015.74
7.1.70.0160.00515.93
7.1.60.0190.00616.37
7.1.50.0230.00815.89
7.1.40.0200.00415.73
7.1.30.0190.00715.74
7.1.20.0200.00715.54
7.1.10.0230.00615.56
7.1.00.0210.01816.90
7.0.330.0100.00815.82
7.0.320.0180.00215.26
7.0.310.0190.00615.33
7.0.300.0240.00615.33
7.0.290.0210.00415.33
7.0.280.0190.00315.26
7.0.270.0200.00615.32
7.0.260.0170.00715.27
7.0.250.0150.00915.36
7.0.240.0230.00615.48
7.0.230.0190.00815.49
7.0.220.0250.00615.50
7.0.210.0210.00515.40
7.0.200.0260.00515.67
7.0.190.0210.00615.46
7.0.180.0220.00415.45
7.0.170.0220.00715.49
7.0.160.0210.00615.34
7.0.150.0170.00915.44
7.0.140.0230.01016.67
7.0.130.0180.00915.45
7.0.120.0160.00415.41
7.0.110.0110.00915.42
7.0.100.0190.00515.35
7.0.90.0200.00515.24
7.0.80.0240.01416.28
7.0.70.0360.02016.25
7.0.60.0300.02116.25
7.0.50.0360.01916.24
7.0.40.0190.01316.32
7.0.30.0160.02016.37
7.0.20.0200.01616.28
7.0.10.0200.01416.29
7.0.00.0230.01616.34
5.6.400.0180.00315.85
5.6.390.0180.00015.88
5.6.380.0110.00815.45
5.6.370.0080.01115.57
5.6.360.0100.01015.49
5.6.350.0170.00215.54
5.6.340.0120.00915.58
5.6.330.0160.00515.42
5.6.320.0150.00415.52
5.6.310.0120.00815.44
5.6.300.0120.00815.45
5.6.290.0120.00715.56
5.6.280.0140.01516.57
5.6.270.0110.00715.49
5.6.260.0080.00915.56
5.6.250.0130.00615.48
5.6.240.0120.00615.50
5.6.230.0100.02016.51
5.6.220.0110.02216.53
5.6.210.0150.01816.57
5.6.200.0140.01516.72
5.6.190.0100.01816.67
5.6.180.0090.02316.61
5.6.170.0110.02216.64
5.6.160.0110.02216.61
5.6.150.0140.02116.57
5.6.140.0120.02016.64
5.6.130.0130.02216.59
5.6.120.0130.02216.60
5.6.110.0120.01716.60
5.6.100.0130.01816.54
5.6.90.0110.02016.52
5.6.80.0100.02216.48
5.6.70.0130.01716.38
5.6.60.0120.02116.45
5.6.50.0110.01616.42
5.6.40.0090.01816.32
5.6.30.0130.01816.40
5.6.20.0130.01816.38
5.6.10.0140.02016.36
5.6.00.0150.01716.36
5.5.380.0110.00814.70
5.5.370.0120.01115.94
5.5.360.0120.02115.69
5.5.350.0140.01815.70
5.5.340.0100.01315.99
5.5.330.0120.02115.84
5.5.320.0070.02515.82
5.5.310.0130.02215.86
5.5.300.0130.02015.82
5.5.290.0110.02015.83
5.5.280.0130.02015.85
5.5.270.0120.01915.81
5.5.260.0110.02315.72
5.5.250.0090.01415.85
5.5.240.0100.02115.64
5.5.230.0090.02115.75
5.5.220.0100.01415.67
5.5.210.0080.01515.61
5.5.200.0110.02015.61
5.5.190.0120.02015.61
5.5.180.0100.01715.65
5.5.170.0170.00815.30
5.5.160.0120.02115.67
5.5.150.0110.01915.57
5.5.140.0080.01915.68
5.5.130.0110.02015.62
5.5.120.0100.02115.67
5.5.110.0130.02115.62
5.5.100.0110.01315.75
5.5.90.0100.02015.70
5.5.80.0080.02215.60
5.5.70.0110.01915.79
5.5.60.0080.02415.74
5.5.50.0100.01815.68
5.5.40.0110.02115.62
5.5.30.0120.01515.55
5.5.20.0100.02115.67
5.5.10.0110.01215.55
5.5.00.0080.01515.51
5.4.450.0080.02113.68
5.4.440.0120.01713.69
5.4.430.0080.02013.67
5.4.420.0120.01813.76
5.4.410.0090.02013.71
5.4.400.0090.01913.51
5.4.390.0110.01813.62
5.4.380.0100.01813.52
5.4.370.0080.01413.53
5.4.360.0100.01213.54
5.4.350.0120.01313.66
5.4.340.0100.01813.50
5.4.330.0130.00812.17
5.4.320.0080.01513.52
5.4.310.0110.01613.64
5.4.300.0100.01813.56
5.4.290.0110.01813.63
5.4.280.0080.01613.69
5.4.270.0080.02213.58
5.4.260.0080.01813.63
5.4.250.0090.02013.58
5.4.240.0120.01213.55
5.4.230.0080.01313.36
5.4.220.0090.01613.55
5.4.210.0080.02113.48
5.4.200.0120.01413.43
5.4.190.0100.01713.44
5.4.180.0120.01813.43
5.4.170.0120.01313.50
5.4.160.0090.01913.55
5.4.150.0090.01613.48
5.4.140.0080.01712.99
5.4.130.0070.01913.04
5.4.120.0100.01713.08
5.4.110.0090.01312.96
5.4.100.0080.01913.05
5.4.90.0090.01713.08
5.4.80.0080.01613.08
5.4.70.0110.01613.08
5.4.60.0090.01513.03
5.4.50.0090.01313.01
5.4.40.0090.01913.02
5.4.30.0100.01713.14
5.4.20.0080.01313.06
5.4.10.0090.01012.98
5.4.00.0110.01712.91

preferences:
48.94 ms | 401 KiB | 5 Q