3v4l.org

run code in 300+ PHP versions simultaneously
<?php function yearlyDays($a, $b) { //Takes in two dates and returns the decimal of days per year for that specific year // I made this in order to fix the issue of leap years. $aYearDay = date("z", strtotime($a)) + 1; $aYearDays = date("z", strtotime(date("Y", strtotime($a))."-12-31")) + 1; $aPercent = $aYearDay/$aYearDays; $bYearDay = date("z", strtotime($b)) + 1; $bYearDays = date("z", strtotime(date("Y", strtotime($b))."-12-31")) + 1; $bPercent = $bYearDay/$bYearDays; if(date("Y", strtotime($a))!=date("Y", strtotime($b))) { $aPercent += abs(date("Y", strtotime($a))-date("Y", strtotime($b))); } return $aPercent-$bPercent; } print yearlyDays("2013-05-12", "2012-05-12");

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.0120.00918.68
8.3.60.0120.00918.56
8.3.50.0100.00922.11
8.3.40.0040.01118.96
8.3.30.0140.00719.07
8.3.20.0040.00420.35
8.3.10.0030.00621.70
8.3.00.0030.01522.52
8.2.190.0110.00317.00
8.2.180.0090.00616.63
8.2.170.0140.00022.96
8.2.160.0070.00719.21
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0030.00619.60
8.2.110.0090.00022.12
8.2.100.0040.00818.16
8.2.90.0080.00019.47
8.2.80.0040.00417.97
8.2.70.0080.00018.00
8.2.60.0000.00817.93
8.2.50.0000.00918.07
8.2.40.0050.00318.34
8.2.30.0000.00718.20
8.2.20.0000.00818.03
8.2.10.0050.00217.93
8.2.00.0110.00018.06
8.1.280.0150.00625.92
8.1.270.0090.00022.10
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0070.00419.23
8.1.220.0030.00517.79
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0080.00017.64
8.1.180.0060.00318.80
8.1.170.0030.00718.65
8.1.160.0040.00422.15
8.1.150.0040.00418.75
8.1.140.0040.00417.65
8.1.130.0050.00317.82
8.1.120.0000.00717.68
8.1.110.0080.00017.63
8.1.100.0000.00717.55
8.1.90.0040.00417.61
8.1.80.0000.00717.56
8.1.70.0030.00317.62
8.1.60.0060.00317.72
8.1.50.0050.00217.61
8.1.40.0060.00317.69
8.1.30.0000.00717.74
8.1.20.0040.00417.79
8.1.10.0040.00417.66
8.1.00.0000.00717.60
8.0.300.0040.00418.77
8.0.290.0000.00817.28
8.0.280.0000.00718.46
8.0.270.0000.00817.21
8.0.260.0000.00817.09
8.0.250.0030.00317.23
8.0.240.0000.01017.27
8.0.230.0040.00417.20
8.0.220.0070.00017.20
8.0.210.0040.00417.14
8.0.200.0080.00017.24
8.0.190.0000.00817.17
8.0.180.0080.00017.07
8.0.170.0040.00417.16
8.0.160.0000.00717.12
8.0.150.0070.00017.03
8.0.140.0050.00517.05
8.0.130.0030.00313.54
8.0.120.0040.00417.17
8.0.110.0040.00417.07
8.0.100.0000.00716.99
8.0.90.0050.00317.08
8.0.80.0040.01517.17
8.0.70.0000.00717.17
8.0.60.0000.00716.99
8.0.50.0040.00417.14
8.0.30.0130.00517.50
8.0.20.0110.01117.40
8.0.10.0070.00017.10
8.0.00.0170.00716.86
7.4.330.0000.00515.00
7.4.320.0000.00716.74
7.4.300.0030.00316.80
7.4.290.0000.00716.66
7.4.280.0030.00316.63
7.4.270.0030.00516.54
7.4.260.0040.00416.67
7.4.250.0000.00716.75
7.4.240.0030.00416.73
7.4.230.0070.00016.50
7.4.220.0070.01316.75
7.4.210.0060.00916.73
7.4.200.0040.00416.75
7.4.190.0000.00916.82
7.4.160.0040.01116.71
7.4.150.0070.01017.40
7.4.140.0110.00917.86
7.4.130.0080.01116.73
7.4.120.0120.00516.72
7.4.110.0150.00616.67
7.4.100.0090.00816.52
7.4.90.0060.01216.68
7.4.80.0170.00719.39
7.4.70.0090.00916.49
7.4.60.0060.00916.71
7.4.50.0040.00416.85
7.4.40.0030.00922.77
7.4.30.0120.00316.56
7.4.10.0100.01015.32
7.4.00.0100.00815.05
7.3.330.0000.00613.50
7.3.320.0030.00313.53
7.3.310.0000.00816.56
7.3.300.0070.00016.46
7.3.290.0030.01616.50
7.3.280.0080.01016.50
7.3.270.0090.00917.40
7.3.260.0070.01016.63
7.3.250.0130.00716.55
7.3.240.0120.00616.47
7.3.230.0070.01116.39
7.3.210.0100.00716.74
7.3.200.0070.01416.62
7.3.190.0100.00616.55
7.3.180.0060.01016.48
7.3.170.0130.00416.55
7.3.160.0120.00416.52
7.3.130.0000.01815.07
7.3.120.0060.00915.05
7.3.110.0100.00614.80
7.3.100.0030.00914.67
7.3.90.0030.00914.76
7.3.80.0030.00514.88
7.3.70.0170.00015.10
7.3.60.0030.00715.02
7.3.50.0070.00715.13
7.3.40.0090.00615.09
7.3.30.0030.01015.04
7.3.20.0030.01016.83
7.3.10.0070.00916.71
7.3.00.0070.00816.89
7.2.330.0120.00617.00
7.2.320.0030.01716.93
7.2.310.0080.00816.66
7.2.300.0070.01016.95
7.2.290.0090.01216.83
7.2.260.0070.01015.18
7.2.250.0070.01015.06
7.2.240.0070.01015.07
7.2.230.0100.00315.05
7.2.220.0030.00715.09
7.2.210.0090.00915.14
7.2.200.0090.00314.97
7.2.190.0060.01014.96
7.2.180.0080.00415.34
7.2.170.0090.00614.96
7.2.160.0170.00015.11
7.2.150.0070.00717.05
7.2.140.0090.00617.26
7.2.130.0090.00716.99
7.2.120.0030.01017.12
7.2.110.0080.00516.82
7.2.100.0080.00717.01
7.2.90.0060.00816.94
7.2.80.0080.00817.05
7.2.70.0110.00316.95
7.2.60.0050.01317.11
7.2.50.0070.00816.87
7.2.40.0050.00716.98
7.2.30.0080.01017.07
7.2.20.0070.00417.15
7.2.10.0030.01216.96
7.2.00.0050.00817.97
7.1.330.0060.00616.03
7.1.320.0090.00616.06
7.1.310.0110.00415.93
7.1.300.0000.00915.88
7.1.290.0070.00715.73
7.1.280.0000.01216.05
7.1.270.0040.01115.93
7.1.260.0080.00616.04
7.1.250.0080.00715.95
7.1.240.0070.00715.98
7.1.230.0000.01415.84
7.1.220.0140.00015.73
7.1.210.0070.00715.82
7.1.200.0040.00615.81
7.1.190.0070.00715.96
7.1.180.0030.01016.07
7.1.170.0040.01215.91
7.1.160.0030.00915.85
7.1.150.0030.00615.77
7.1.140.0100.00315.99
7.1.130.0090.00615.89
7.1.120.0000.01016.09
7.1.110.0090.00916.03
7.1.100.0020.00917.01
7.1.90.0090.00015.90
7.1.80.0070.00715.96
7.1.70.0060.00616.59
7.1.60.0100.00917.76
7.1.50.0050.00916.56
7.1.40.0030.01215.89
7.1.30.0000.01215.79
7.1.20.0030.01215.92
7.1.10.0100.00716.00
7.1.00.0040.03519.22
7.0.330.0130.00315.37
7.0.320.0000.01615.53
7.0.310.0000.01515.37
7.0.300.0060.00815.52
7.0.290.0080.00615.44
7.0.280.0070.00315.27
7.0.270.0140.00015.44
7.0.260.0060.00315.47
7.0.250.0130.00015.49
7.0.240.0110.00415.38
7.0.230.0130.00315.68
7.0.220.0000.00915.65
7.0.210.0060.01015.51
7.0.200.0080.00716.17
7.0.190.0070.01015.59
7.0.180.0040.01115.43
7.0.170.0040.00815.43
7.0.160.0090.00315.80
7.0.150.0040.01415.33
7.0.140.0070.04218.85
7.0.130.0100.00315.72
7.0.120.0030.01215.17
7.0.110.0030.01015.21
7.0.100.0080.02718.55
7.0.90.0080.04018.66
7.0.80.0090.04018.63
7.0.70.0070.04518.63
7.0.60.0030.04118.59
7.0.50.0100.03318.95
7.0.40.0030.04716.90
7.0.30.0050.02916.79
7.0.20.0050.03016.95
7.0.10.0060.04216.79
7.0.00.0100.04316.88
5.6.400.0040.01114.40
5.6.390.0080.00414.66
5.6.380.0070.00714.72
5.6.370.0060.00614.52
5.6.360.0070.00314.50
5.6.350.0060.00814.45
5.6.340.0030.01114.75
5.6.330.0030.00714.71
5.6.320.0000.01814.44
5.6.310.0030.01314.41
5.6.300.0090.00914.29
5.6.290.0070.01114.54
5.6.280.0000.04317.68
5.6.270.0070.01114.43
5.6.260.0040.01114.62
5.6.250.0100.03517.58
5.6.240.0040.03117.48
5.6.230.0100.04317.62
5.6.220.0090.04217.53
5.6.210.0030.04817.63
5.6.200.0080.02317.97
5.6.190.0070.04517.65
5.6.180.0050.04417.76
5.6.170.0100.04017.77
5.6.160.0050.04717.75
5.6.150.0100.04217.84
5.6.140.0050.02817.83
5.6.130.0060.02917.83
5.6.120.0050.03617.89
5.6.110.0060.04317.68
5.6.100.0050.04517.62
5.6.90.0070.03517.69
5.6.80.0080.04817.45
5.6.70.0070.03917.42
5.6.60.0120.03817.35
5.6.50.0100.03717.38
5.6.40.0100.04017.38
5.6.30.0020.03017.41
5.6.20.0070.02917.24
5.6.10.0070.02517.39
5.6.00.0070.04517.49
5.5.380.0050.04217.33
5.5.370.0000.04517.48
5.5.360.0110.04117.49
5.5.350.0080.04317.51
5.5.340.0050.04617.63
5.5.330.0060.03917.43
5.5.320.0070.03717.60
5.5.310.0130.03517.63
5.5.300.0050.04717.69
5.5.290.0100.04317.78
5.5.280.0020.03317.75
5.5.270.0030.03017.57
5.5.260.0050.04117.67
5.5.250.0100.03517.45
5.5.240.0030.03117.26
5.5.230.0070.02717.35
5.5.220.0090.02617.31
5.5.210.0060.04117.25
5.5.200.0050.04516.98
5.5.190.0050.03417.19
5.5.180.0050.04517.31
5.5.170.0090.00414.35
5.5.160.0020.03717.25
5.5.150.0030.03417.09
5.5.140.0070.03917.15
5.5.130.0020.03317.29
5.5.120.0030.04717.18
5.5.110.0070.04717.37
5.5.100.0000.03517.19
5.5.90.0060.04417.06
5.5.80.0100.03817.28
5.5.70.0100.02216.97
5.5.60.0080.04417.12
5.5.50.0030.02617.13
5.5.40.0100.03717.10
5.5.30.0050.04317.24
5.5.20.0030.04017.24
5.5.10.0040.04117.27
5.5.00.0060.04016.89
5.4.450.0070.04215.66
5.4.440.0030.04315.73
5.4.430.0040.04415.64
5.4.420.0100.04015.67
5.4.410.0020.03015.66
5.4.400.0040.02215.60
5.4.390.0080.02515.61
5.4.380.0000.03215.63
5.4.370.0020.04715.66
5.4.360.0050.02715.59
5.4.350.0050.04315.48
5.4.340.0120.03515.52
5.4.330.0040.00412.09
5.4.320.0120.02715.62
5.4.310.0050.03115.50
5.4.300.0030.04515.56
5.4.290.0080.03915.62
5.4.280.0120.03415.57
5.4.270.0060.04015.48
5.4.260.0110.03415.55
5.4.250.0070.02615.65
5.4.240.0050.03015.59
5.4.230.0030.03015.61
5.4.220.0060.04115.57
5.4.210.0070.02115.47
5.4.200.0080.03515.63
5.4.190.0030.04215.56
5.4.180.0070.03615.55
5.4.170.0000.03015.49
5.4.160.0050.04215.60
5.4.150.0070.02715.56
5.4.140.0040.02714.30
5.4.130.0030.02614.29
5.4.120.0030.02714.29
5.4.110.0030.04314.31
5.4.100.0070.02814.26
5.4.90.0090.02014.25
5.4.80.0090.02114.32
5.4.70.0090.03214.21
5.4.60.0120.01814.21
5.4.50.0060.03614.28
5.4.40.0030.04314.28
5.4.30.0050.03114.28
5.4.20.0040.03014.27
5.4.10.0090.03614.29
5.4.00.0100.03813.99
5.3.290.0030.04313.35
5.3.280.0050.03513.38
5.3.270.0060.03113.32
5.3.260.0020.04313.35
5.3.250.0000.04213.40
5.3.240.0050.02413.41
5.3.230.0030.04013.31
5.3.220.0030.04213.31
5.3.210.0070.04213.34
5.3.200.0080.03813.34
5.3.190.0050.04213.34
5.3.180.0080.03913.35
5.3.170.0050.02713.36
5.3.160.0120.03413.31
5.3.150.0050.04113.32
5.3.140.0040.04113.34
5.3.130.0050.03513.36
5.3.120.0020.04213.31
5.3.110.0050.04113.31
5.3.100.0070.02813.06
5.3.90.0080.02413.09
5.3.80.0040.04313.02
5.3.70.0070.03713.03
5.3.60.0090.01913.00
5.3.50.0030.04512.99
5.3.40.0110.03513.08
5.3.30.0100.03112.95
5.3.20.0030.02512.94
5.3.10.0080.03312.91
5.3.00.0070.02912.90
5.2.170.0130.05711.21
5.2.160.0070.04711.21
5.2.150.0070.04711.22
5.2.140.0100.04711.07
5.2.130.0070.05711.12
5.2.120.0070.04711.16
5.2.110.0070.05710.97
5.2.100.0070.06011.13
5.2.90.0100.04311.03
5.2.80.0000.05010.96
5.2.70.0070.05711.04
5.2.60.0070.06311.08
5.2.50.0100.05310.93
5.2.40.0030.04711.03
5.2.30.0030.06011.00
5.2.20.0030.03011.11
5.2.10.0000.05011.01
5.2.00.0070.06010.66
5.1.60.0030.05710.00
5.1.50.0100.04710.12
5.1.40.0000.04710.04
5.1.30.0030.03310.47
5.1.20.0070.05310.29
5.1.10.0030.04310.20
5.1.00.0070.05310.14
5.0.50.0000.0378.64
5.0.40.0030.0278.27
5.0.30.0030.0578.29
5.0.20.0000.0378.27
5.0.10.0000.0208.22
5.0.00.0000.0678.17
4.4.90.0000.0377.03
4.4.80.0030.0337.03
4.4.70.0000.0177.03
4.4.60.0000.0337.03
4.4.50.0030.0237.03
4.4.40.0030.0407.03
4.4.30.0030.0277.03
4.4.20.0030.0337.03
4.4.10.0070.0237.03
4.4.00.0000.0537.03
4.3.110.0000.0377.03
4.3.100.0000.0337.03
4.3.90.0000.0207.03
4.3.80.0030.0537.03
4.3.70.0000.0337.03
4.3.60.0070.0307.03
4.3.50.0000.0237.03
4.3.40.0000.0537.03
4.3.30.0000.0377.03
4.3.20.0000.0407.03
4.3.10.0030.0277.03
4.3.00.0000.0377.03

preferences:
51.62 ms | 401 KiB | 5 Q