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); var_dump($diff);

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.01118.40
8.3.50.0120.00821.99
8.3.40.0160.00318.79
8.3.30.0040.01818.70
8.3.20.0060.00318.89
8.3.10.0080.00021.14
8.3.00.0030.00523.65
8.2.180.0070.00716.50
8.2.170.0210.00022.96
8.2.160.0100.00320.44
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.04
8.2.110.0100.00722.20
8.2.100.0070.00417.91
8.2.90.0070.00019.34
8.2.80.0000.00719.31
8.2.70.0030.00917.75
8.2.60.0070.00018.05
8.2.50.0090.00018.07
8.2.40.0000.00818.22
8.2.30.0040.00419.38
8.2.20.0020.00517.79
8.2.10.0060.00317.87
8.2.00.0060.00317.99
8.1.280.0100.00725.92
8.1.270.0030.00623.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.64
8.1.230.0070.00420.98
8.1.220.0080.00018.77
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0000.00717.53
8.1.180.0000.00818.10
8.1.170.0050.00318.71
8.1.160.0070.00018.94
8.1.150.0000.00818.80
8.1.140.0050.00217.58
8.1.130.0040.00417.90
8.1.120.0000.00717.59
8.1.110.0040.00417.50
8.1.100.0020.00517.47
8.1.90.0000.00717.65
8.1.80.0040.00417.55
8.1.70.0000.00717.54
8.1.60.0110.00417.57
8.1.50.0060.00517.49
8.1.40.0110.00317.56
8.1.30.0070.00717.56
8.1.20.0110.00417.65
8.1.10.0110.00417.57
8.1.00.0090.00617.54
8.0.300.0000.00819.94
8.0.290.0000.00817.05
8.0.280.0000.00718.55
8.0.270.0000.00717.37
8.0.260.0060.00017.07
8.0.250.0000.00817.09
8.0.240.0000.00817.17
8.0.230.0030.00317.15
8.0.220.0030.00317.02
8.0.210.0030.00316.95
8.0.200.0090.00017.03
8.0.190.0080.00417.04
8.0.180.0070.00517.06
8.0.170.0070.00517.11
8.0.160.0060.00517.02
8.0.150.0030.00816.96
8.0.140.0080.00617.03
8.0.130.0070.00716.08
8.0.120.0080.00617.04
8.0.110.0090.00317.06
8.0.100.0070.00517.00
8.0.90.0110.00216.97
8.0.80.0060.00717.05
8.0.70.0070.00616.95
8.0.60.0080.00316.93
8.0.50.0050.00616.85
8.0.30.0090.00617.03
8.0.20.0080.00917.22
8.0.10.0080.00317.17
8.0.00.0080.00717.02
7.4.330.0000.00616.74
7.4.320.0060.00016.56
7.4.300.0000.00616.55
7.4.290.0050.00516.59
7.4.280.0080.00416.51
7.4.270.0050.00416.48
7.4.260.0060.00315.71
7.4.250.0070.00516.54
7.4.240.0080.00416.48
7.4.230.0110.00216.50
7.4.220.0110.00416.46
7.4.210.0060.00816.57
7.4.200.0060.00616.43
7.4.190.0100.00216.57
7.4.180.0080.00516.53
7.4.160.0090.00516.50
7.4.150.0100.00616.68
7.4.140.0090.00516.86
7.4.130.0100.00516.42
7.4.120.0090.00616.50
7.4.110.0070.00716.25
7.4.100.0100.00616.48
7.4.90.0120.00216.36
7.4.80.0130.00317.02
7.4.70.0110.00516.35
7.4.60.0140.00316.40
7.4.50.0100.00516.31
7.4.40.0100.00517.86
7.4.30.0110.00516.50
7.4.20.0090.00616.22
7.4.10.0110.00216.37
7.4.00.0080.00715.72
7.3.330.0090.00415.60
7.3.320.0090.00415.46
7.3.310.0090.00516.22
7.3.300.0100.00316.35
7.3.290.0120.00316.29
7.3.280.0070.00816.40
7.3.270.0100.00616.61
7.3.260.0100.00717.25
7.3.250.0070.00816.39
7.3.240.0100.00516.39
7.3.230.0100.00716.36
7.3.220.0120.00416.35
7.3.210.0080.00916.38
7.3.200.0100.00617.14
7.3.190.0090.00616.44
7.3.180.0110.00516.43
7.3.170.0110.00516.40
7.3.160.0130.00416.49
7.3.150.0110.00416.35
7.3.140.0130.00316.32
7.3.130.0100.00616.42
7.3.120.0100.00615.81
7.3.110.0100.00615.97
7.3.100.0110.00516.01
7.3.90.0120.00316.03
7.3.80.0090.00615.88
7.3.70.0110.00515.91
7.3.60.0120.00316.01
7.3.50.0090.00616.07
7.3.40.0110.00316.08
7.3.30.0090.00516.06
7.3.20.0130.00217.90
7.3.10.0090.00617.80
7.3.00.0110.00317.79
7.2.340.0110.00416.42
7.2.330.0090.00716.49
7.2.320.0080.00816.58
7.2.310.0110.00516.50
7.2.300.0100.00616.55
7.2.290.0100.00516.49
7.2.280.0120.00316.52
7.2.270.0100.00516.58
7.2.260.0110.00516.47
7.2.250.0120.00516.10
7.2.240.0150.00316.16
7.2.230.0110.00416.12
7.2.220.0090.00616.16
7.2.210.0080.00716.14
7.2.200.0130.00416.27
7.2.190.0130.00316.05
7.2.180.0100.00516.21
7.2.170.0110.00516.18
7.2.160.0110.00416.54
7.2.150.0120.00518.41
7.2.140.0100.00718.43
7.2.130.0140.00318.47
7.2.120.0140.00318.67
7.2.110.0110.00718.56
7.2.100.0110.00618.59
7.2.90.0110.00618.42
7.2.80.0120.00418.45
7.2.70.0100.00818.30
7.2.60.0110.00618.45
7.2.50.0100.00618.31
7.2.40.0120.00318.53
7.2.30.0100.00718.47
7.2.20.0100.00718.54
7.2.10.0090.00818.45
7.2.00.0140.00218.46
7.1.330.0050.01017.04
7.1.320.0080.00617.08
7.1.310.0120.00216.99
7.1.300.0100.00517.01
7.1.290.0090.00517.00
7.1.280.0080.00717.09
7.1.270.0090.00617.06
7.1.260.0080.00617.03
7.1.250.0100.00617.41
7.1.240.0110.00417.42
7.1.230.0110.00417.45
7.1.220.0120.00217.33
7.1.210.0060.00817.36
7.1.200.0120.00317.33
7.1.190.0130.00217.28
7.1.180.0100.00417.33
7.1.170.0120.00317.37
7.1.160.0120.00317.42
7.1.150.0100.00417.36
7.1.140.0100.00517.38
7.1.130.0110.00417.31
7.1.120.0060.00817.38
7.1.110.0110.00317.36
7.1.100.0060.01017.49
7.1.90.0140.00217.36
7.1.80.0130.00317.38
7.1.70.0090.00517.24
7.1.60.0100.00817.93
7.1.50.0090.00717.35
7.1.40.0070.00717.46
7.1.30.0100.00417.52
7.1.20.0090.00517.42
7.1.10.0110.00417.37
7.1.00.0090.01118.64
7.0.330.0080.00617.04
7.0.320.0070.00717.06
7.0.310.0100.00417.00
7.0.300.0110.00317.13
7.0.290.0100.00417.06
7.0.280.0110.00317.00
7.0.270.0110.00317.06
7.0.260.0100.00416.92
7.0.250.0100.00417.34
7.0.240.0130.00117.25
7.0.230.0080.00617.26
7.0.220.0100.00517.31
7.0.210.0100.00517.09
7.0.200.0070.00617.14
7.0.190.0140.00117.20
7.0.180.0100.00517.38
7.0.170.0090.00717.33
7.0.160.0110.00317.09
7.0.150.0110.00417.14
7.0.140.0110.01918.34
7.0.130.0120.00217.18
7.0.120.0070.00817.21
7.0.110.0110.00317.07
7.0.100.0080.01817.83
7.0.90.0140.01917.67
7.0.80.0110.02217.74
7.0.70.0130.02017.70
7.0.60.0080.02617.70
7.0.50.0200.01417.85
7.0.40.0100.01517.75
7.0.30.0090.01717.92
7.0.20.0100.01417.80
7.0.10.0050.01717.84
7.0.00.0040.02517.82
5.6.400.0090.00515.73
5.6.390.0090.00515.95
5.6.380.0070.00715.88
5.6.370.0100.00415.86
5.6.360.0100.00415.89
5.6.350.0110.00315.81
5.6.340.0060.00815.84
5.6.330.0090.00515.87
5.6.320.0090.00515.78
5.6.310.0100.00515.88
5.6.300.0090.00415.84
5.6.290.0130.00115.96
5.6.280.0070.02317.16
5.6.270.0120.00215.88
5.6.260.0100.00415.84
5.6.250.0100.02417.00
5.6.240.0100.02217.12
5.6.230.0080.02517.07
5.6.220.0090.01617.12
5.6.210.0120.01317.12
5.6.200.0090.01917.23
5.6.190.0120.01417.23
5.6.180.0090.02317.16
5.6.170.0090.02517.16
5.6.160.0130.02217.18
5.6.150.0110.02217.31
5.6.140.0110.02217.25
5.6.130.0080.02717.30
5.6.120.0130.02017.29
5.6.110.0090.02217.24
5.6.100.0110.02217.13
5.6.90.0100.01517.10
5.6.80.0090.01617.02
5.6.70.0120.01717.00
5.6.60.0080.02517.06
5.6.50.0120.01217.02
5.6.40.0090.01216.86
5.6.30.0100.01117.02
5.6.20.0090.01216.97
5.6.10.0060.01516.93
5.6.00.0090.01216.90
5.5.380.0080.02417.13
5.5.370.0070.02517.18
5.5.360.0100.02316.91
5.5.350.0080.02616.92
5.5.340.0150.01717.13
5.5.330.0100.02317.03
5.5.320.0070.02417.00
5.5.310.0070.02517.01
5.5.300.0110.02016.99
5.5.290.0080.02017.03
5.5.280.0140.01916.97
5.5.270.0100.01517.06
5.5.260.0090.02516.89
5.5.250.0130.02117.08
5.5.240.0120.02116.92
5.5.230.0120.02116.91
5.5.220.0090.02016.86
5.5.210.0110.02017.02
5.5.200.0070.01416.76
5.5.190.0090.01516.91
5.5.180.0100.01416.82
5.5.170.0110.00315.69
5.5.160.0080.01316.83
5.5.150.0100.01416.72
5.5.140.0110.01016.68
5.5.130.0110.01816.71
5.5.120.0090.02216.68
5.5.110.0090.02216.80
5.5.100.0090.02416.93
5.5.90.0090.01416.82
5.5.80.0080.01516.94
5.5.70.0090.01216.99
5.5.60.0100.01216.89
5.5.50.0090.02216.93
5.5.40.0100.02016.84
5.5.30.0080.01216.93
5.5.20.0050.01816.87
5.5.10.0110.02116.68
5.5.00.0070.01816.79
5.4.450.0080.02214.19
5.4.440.0090.02114.35
5.4.430.0100.02114.24
5.4.420.0080.01614.34
5.4.410.0090.02514.15
5.4.400.0080.02114.15
5.4.390.0080.01414.19
5.4.380.0100.01814.33
5.4.370.0110.00914.20
5.4.360.0080.01514.19
5.4.350.0080.01214.26
5.4.340.0100.01314.22
5.4.330.0070.00412.60
5.4.320.0050.01514.22
5.4.310.0100.01114.25
5.4.300.0080.01114.29
5.4.290.0060.02214.21
5.4.280.0100.02114.26
5.4.270.0070.02214.35
5.4.260.0090.02014.24
5.4.250.0080.01014.16
5.4.240.0070.01314.21
5.4.230.0080.01013.97
5.4.220.0070.01314.08
5.4.210.0070.02014.16
5.4.200.0060.01614.01
5.4.190.0060.01614.11
5.4.180.0090.01114.09
5.4.170.0070.02114.10
5.4.160.0050.01514.11
5.4.150.0090.02014.05
5.4.140.0090.01813.53
5.4.130.0040.01513.44
5.4.120.0100.01013.57
5.4.110.0100.01713.50
5.4.100.0080.01413.50
5.4.90.0050.01613.59
5.4.80.0080.01113.54
5.4.70.0080.01013.52
5.4.60.0080.01013.45
5.4.50.0060.01213.50
5.4.40.0060.01213.56
5.4.30.0090.01213.57
5.4.20.0070.01713.66
5.4.10.0070.01213.52
5.4.00.0070.01113.24
5.3.290.0060.01313.67
5.3.280.0040.02313.56
5.3.270.0050.02613.56
5.3.260.0090.01613.63
5.3.250.0050.01513.54
5.3.240.0070.01313.56
5.3.230.0060.01413.70
5.3.220.0080.01013.45
5.3.210.0050.01513.54
5.3.200.0070.01413.48
5.3.190.0070.01513.58
5.3.180.0060.01313.61
5.3.170.0070.01113.67
5.3.160.0070.01313.48
5.3.150.0070.02013.51
5.3.140.0050.01613.46
5.3.130.0070.01413.47
5.3.120.0080.01013.53
5.3.110.0080.01213.59
5.3.100.0110.00913.46
5.3.90.0050.01313.56
5.3.80.0080.01113.53
5.3.70.0090.01113.53
5.3.60.0060.01313.58
5.3.50.0100.00913.46
5.3.40.0060.01213.55
5.3.30.0050.01413.51
5.3.20.0060.01213.58
5.3.10.0100.00813.31
5.3.00.0050.01313.32

preferences:
54.11 ms | 401 KiB | 5 Q