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))) { //a percent is .6 in the year 2013 leap year //b percent is .7 in the year 2012 $aPercent += abs(date("Y", strtotime($a))-date("Y", strtotime($b))); print $aPercent; } return $aPercent-$bPercent; } print yearlyDays("2012-05-12", "2013-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.60.0120.00618.38
8.3.50.0080.01021.09
8.3.40.0110.00419.10
8.3.30.0170.00018.98
8.3.20.0040.00420.35
8.3.10.0040.00421.97
8.3.00.0050.00322.37
8.2.180.0090.00916.75
8.2.170.0140.00022.96
8.2.160.0100.00319.11
8.2.150.0040.00424.18
8.2.140.0070.00324.66
8.2.130.0070.01026.16
8.2.120.0070.00317.75
8.2.110.0030.00622.12
8.2.100.0080.00419.34
8.2.90.0050.00319.34
8.2.80.0030.00517.97
8.2.70.0060.00317.75
8.2.60.0040.00418.05
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0030.00518.08
8.2.20.0050.00317.86
8.2.10.0060.00317.94
8.2.00.0000.01018.08
8.1.280.0070.00725.92
8.1.270.0000.00822.06
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.58
8.1.230.0070.00319.07
8.1.220.0030.00617.91
8.1.210.0050.00318.77
8.1.200.0080.00017.48
8.1.190.0000.00817.64
8.1.180.0050.00318.82
8.1.170.0100.00018.57
8.1.160.0000.00722.04
8.1.150.0040.00418.75
8.1.140.0040.00417.65
8.1.130.0000.00717.86
8.1.120.0030.00517.58
8.1.110.0000.00817.65
8.1.100.0000.00717.67
8.1.90.0000.00817.66
8.1.80.0040.00417.74
8.1.70.0000.00717.48
8.1.60.0040.00417.75
8.1.50.0070.00017.64
8.1.40.0000.00817.61
8.1.30.0030.00517.79
8.1.20.0000.00817.75
8.1.10.0070.00017.69
8.1.00.0000.00717.51
8.0.300.0000.00918.77
8.0.290.0000.00717.18
8.0.280.0030.00318.54
8.0.270.0000.00717.20
8.0.260.0030.00317.16
8.0.250.0040.00417.12
8.0.240.0060.00317.26
8.0.230.0030.00717.23
8.0.220.0030.00317.19
8.0.210.0000.00717.17
8.0.200.0000.00817.20
8.0.190.0000.00717.22
8.0.180.0040.00417.18
8.0.170.0040.00417.12
8.0.160.0080.00017.24
8.0.150.0000.00717.04
8.0.140.0030.00617.15
8.0.130.0060.00013.59
8.0.120.0040.00417.16
8.0.110.0000.00817.12
8.0.100.0000.00817.16
8.0.90.0040.00417.16
8.0.80.0080.00817.05
8.0.70.0040.00417.06
8.0.60.0040.00417.00
8.0.50.0080.00017.06
8.0.30.0070.01417.23
8.0.20.0100.00817.45
8.0.10.0030.00317.09
8.0.00.0140.01016.74
7.4.330.0000.00515.00
7.4.320.0030.00316.75
7.4.300.0000.00616.54
7.4.290.0000.00716.71
7.4.280.0030.00316.64
7.4.270.0030.00316.64
7.4.260.0030.00316.76
7.4.250.0040.00416.62
7.4.240.0030.00316.67
7.4.230.0070.00016.59
7.4.220.0030.01316.74
7.4.210.0050.01016.71
7.4.200.0050.00216.73
7.4.190.0030.00316.63
7.4.160.0110.00616.71
7.4.150.0030.01317.40
7.4.140.0120.00517.86
7.4.130.0120.00816.72
7.4.120.0090.00816.66
7.4.110.0120.00916.65
7.4.100.0070.01016.70
7.4.90.0120.00616.67
7.4.80.0090.01219.39
7.4.70.0090.00916.70
7.4.60.0130.00316.63
7.4.50.0060.00316.40
7.4.40.0110.00722.77
7.4.30.0130.00316.59
7.4.10.0070.01315.39
7.4.00.0100.00715.22
7.3.330.0000.00613.47
7.3.320.0060.00013.49
7.3.310.0030.00316.33
7.3.300.0030.00316.52
7.3.290.0100.00316.47
7.3.280.0060.00916.48
7.3.270.0070.01017.40
7.3.260.0060.01116.62
7.3.250.0080.00916.65
7.3.240.0130.00316.55
7.3.230.0100.01016.54
7.3.210.0130.00316.64
7.3.200.0100.01316.59
7.3.190.0070.01016.57
7.3.180.0070.01016.41
7.3.170.0110.00516.71
7.3.160.0090.00916.52
7.3.130.0070.01114.86
7.3.120.0040.01115.04
7.3.110.0070.01114.94
7.3.100.0040.01014.92
7.3.90.0080.00415.12
7.3.80.0050.00615.13
7.3.70.0050.01015.06
7.3.60.0060.00614.95
7.3.50.0070.00814.84
7.3.40.0060.00714.77
7.3.30.0050.00714.95
7.3.20.0030.01016.77
7.3.10.0060.00816.79
7.3.00.0070.00516.79
7.2.330.0070.01416.51
7.2.320.0150.00616.99
7.2.310.0060.01016.95
7.2.300.0140.00716.96
7.2.290.0060.01016.64
7.2.260.0120.00315.23
7.2.250.0070.00915.23
7.2.240.0090.00715.14
7.2.230.0070.00815.19
7.2.220.0080.00715.28
7.2.210.0050.00915.27
7.2.200.0060.00915.10
7.2.190.0040.00915.08
7.2.180.0050.00815.24
7.2.170.0060.00815.18
7.2.160.0020.01215.19
7.2.150.0080.00716.98
7.2.140.0060.00617.06
7.2.130.0110.00517.05
7.2.120.0050.01117.06
7.2.110.0080.00717.06
7.2.100.0030.00917.05
7.2.90.0090.00516.89
7.2.80.0050.01017.03
7.2.70.0080.00916.90
7.2.60.0070.00816.96
7.2.50.0080.00717.15
7.2.40.0070.00816.93
7.2.30.0050.00917.09
7.2.20.0100.00717.10
7.2.10.0080.00917.12
7.2.00.0070.00817.73
7.1.330.0030.01016.01
7.1.320.0080.00415.77
7.1.310.0050.00916.01
7.1.300.0060.00815.73
7.1.290.0080.00615.91
7.1.280.0070.00915.97
7.1.270.0040.00916.07
7.1.260.0090.00615.81
7.1.250.0070.00715.94
7.1.240.0100.00315.90
7.1.230.0030.01015.86
7.1.220.0150.00015.92
7.1.210.0100.00316.04
7.1.200.0070.00415.85
7.1.190.0000.01515.80
7.1.180.0090.00615.92
7.1.170.0030.00615.73
7.1.160.0070.01015.79
7.1.150.0030.01016.05
7.1.140.0090.00615.77
7.1.130.0040.00815.75
7.1.120.0040.01115.91
7.1.110.0080.00515.97
7.1.100.0030.00717.06
7.1.90.0030.01215.85
7.1.80.0100.00316.02
7.1.70.0030.00816.78
7.1.60.0050.00817.92
7.1.50.0100.00716.73
7.1.40.0070.00415.85
7.1.30.0000.00916.17
7.1.20.0050.00515.88
7.1.10.0040.01115.72
7.1.00.0070.01819.17
7.0.330.0070.00715.56
7.0.320.0070.00715.37
7.0.310.0090.00615.48
7.0.300.0060.00615.50
7.0.290.0040.01115.51
7.0.280.0070.00715.39
7.0.270.0070.00315.66
7.0.260.0000.01415.40
7.0.250.0040.00715.71
7.0.240.0040.01115.57
7.0.230.0060.00915.61
7.0.220.0000.01015.74
7.0.210.0060.00915.65
7.0.200.0090.00216.03
7.0.190.0030.00915.64
7.0.180.0030.01015.36
7.0.170.0080.00015.46
7.0.160.0030.01315.36
7.0.150.0040.00415.56
7.0.140.0020.04518.82
7.0.130.0060.00615.27
7.0.120.0110.00415.64
7.0.110.0060.00915.66
7.0.100.0060.01015.71
7.0.90.0050.05418.69
7.0.80.0040.04218.68
7.0.70.0040.02918.54
7.0.60.0030.03918.55
7.0.50.0050.02518.87
7.0.40.0090.04216.85
7.0.30.0060.02916.87
7.0.20.0030.04316.90
7.0.10.0030.04216.78
7.0.00.0050.02616.89
5.6.400.0000.01314.72
5.6.390.0060.00914.25
5.6.380.0030.00914.58
5.6.370.0070.00714.49
5.6.360.0000.01714.43
5.6.350.0040.01114.49
5.6.340.0090.00314.63
5.6.330.0040.00814.71
5.6.320.0060.00614.68
5.6.310.0090.00614.52
5.6.300.0080.00614.38
5.6.290.0060.00314.88
5.6.280.0070.03717.84
5.6.270.0140.00014.60
5.6.260.0100.00314.55
5.6.250.0040.00714.52
5.6.240.0100.03817.61
5.6.230.0000.04217.50
5.6.220.0070.03717.63
5.6.210.0060.03517.58
5.6.200.0030.03017.81
5.6.190.0030.04517.74
5.6.180.0090.04317.65
5.6.170.0100.04417.76
5.6.160.0000.03217.81
5.6.150.0070.03517.65
5.6.140.0000.04817.70
5.6.130.0040.02917.88
5.6.120.0050.04017.78
5.6.110.0080.03917.86
5.6.100.0030.02817.70
5.6.90.0050.04217.76
5.6.80.0050.04217.39
5.6.70.0090.03717.54
5.6.60.0080.04117.37
5.6.50.0050.03917.44
5.6.40.0020.03317.56
5.6.30.0070.02717.47
5.6.20.0040.04517.50
5.6.10.0030.02617.29
5.6.00.0080.04017.47
5.5.380.0070.02717.51
5.5.370.0060.04317.41
5.5.360.0050.04217.42
5.5.350.0030.04317.48
5.5.340.0070.04017.75
5.5.330.0040.03217.59
5.5.320.0090.03817.55
5.5.310.0030.02817.66
5.5.300.0040.02717.50
5.5.290.0080.02617.68
5.5.280.0080.03017.60
5.5.270.0050.04817.63
5.5.260.0030.03817.61
5.5.250.0070.03817.39
5.5.240.0050.02917.32
5.5.230.0020.03217.21
5.5.220.0050.03517.24
5.5.210.0070.03817.16
5.5.200.0080.03417.36
5.5.190.0050.02317.43
5.5.180.0030.04217.17
5.5.170.0040.01114.29
5.5.160.0030.02617.24
5.5.150.0080.03817.17
5.5.140.0070.03317.32
5.5.130.0040.02717.27
5.5.120.0050.02517.27
5.5.110.0020.03117.39
5.5.100.0020.03117.37
5.5.90.0030.02317.15
5.5.80.0050.03817.19
5.5.70.0080.03817.27
5.5.60.0050.04117.20
5.5.50.0070.04217.23
5.5.40.0000.03717.31
5.5.30.0090.02517.08
5.5.20.0070.02217.25
5.5.10.0080.04317.34
5.5.00.0000.05217.15
5.4.450.0050.04215.36
5.4.440.0050.02815.45
5.4.430.0080.04015.39
5.4.420.0030.04315.25
5.4.410.0030.04315.37
5.4.400.0060.03815.01
5.4.390.0080.02215.12
5.4.380.0090.03315.09
5.4.370.0050.04215.16
5.4.360.0020.04115.10
5.4.350.0070.02814.98
5.4.340.0020.04415.20
5.4.330.0040.00411.10
5.4.320.0030.04215.19
5.4.310.0030.02715.18
5.4.300.0080.03815.02
5.4.290.0040.03014.96
5.4.280.0010.03815.14
5.4.270.0000.04615.20
5.4.260.0030.02515.13
5.4.250.0030.02515.13
5.4.240.0060.04015.18
5.4.230.0050.02514.97
5.4.220.0030.04115.09
5.4.210.0050.02714.98
5.4.200.0040.04315.26
5.4.190.0020.02615.07
5.4.180.0000.04015.10
5.4.170.0050.02014.98
5.4.160.0020.02514.79
5.4.150.0050.02815.22
5.4.140.0020.04013.88
5.4.130.0020.02713.70
5.4.120.0020.02513.73
5.4.110.0020.02213.74
5.4.100.0070.02513.83
5.4.90.0000.03613.89
5.4.80.0050.02113.71
5.4.70.0050.03813.82
5.4.60.0000.02713.78
5.4.50.0030.03513.90
5.4.40.0000.04213.87
5.4.30.0020.02513.89
5.4.20.0000.04113.82
5.4.10.0040.02413.66
5.4.00.0060.03613.52
5.3.290.0090.03712.89
5.3.280.0040.02212.76
5.3.270.0050.02612.79
5.3.260.0060.02612.79
5.3.250.0050.03712.74
5.3.240.0050.02512.75
5.3.230.0050.04012.77
5.3.220.0040.02512.71
5.3.210.0050.02212.63
5.3.200.0060.04112.46
5.3.190.0020.02712.65
5.3.180.0080.03812.77
5.3.170.0060.02612.79
5.3.160.0050.02412.81
5.3.150.0050.03712.77
5.3.140.0020.04112.72
5.3.130.0020.03612.59
5.3.120.0020.04212.72
5.3.110.0030.02412.73
5.3.100.0030.04312.52
5.3.90.0080.03712.38
5.3.80.0030.03112.42
5.3.70.0020.03512.23
5.3.60.0080.03812.44
5.3.50.0050.03812.33
5.3.40.0030.03912.43
5.3.30.0040.03612.45
5.3.20.0060.03912.32
5.3.10.0040.03512.11
5.3.00.0060.03412.10
5.2.170.0030.06011.07
5.2.160.0000.05711.07
5.2.150.0030.03311.27
5.2.140.0000.06711.24
5.2.130.0070.06011.21
5.2.120.0000.05711.16
5.2.110.0000.05711.14
5.2.100.0030.05711.14
5.2.90.0000.06311.03
5.2.80.0070.05311.22
5.2.70.0030.05311.02
5.2.60.0030.06011.13
5.2.50.0030.06311.02
5.2.40.0130.02710.91
5.2.30.0000.06311.12
5.2.20.0030.06310.89
5.2.10.0030.06010.80
5.2.00.0070.05310.72
5.1.60.0000.05710.09
5.1.50.0030.05010.06
5.1.40.0030.05010.11
5.1.30.0030.03310.21
5.1.20.0000.06010.43
5.1.10.0000.0309.96
5.1.00.0000.0509.97
5.0.50.0070.0179.41
5.0.40.0030.0239.41
5.0.30.0000.0339.41
5.0.20.0030.0439.41
5.0.10.0030.0439.41
5.0.00.0000.0509.41
4.4.90.0000.0339.41
4.4.80.0000.0339.41
4.4.70.0030.0339.41
4.4.60.0030.0279.41
4.4.50.0030.0339.41
4.4.40.0000.0379.41
4.4.30.0030.0279.41
4.4.20.0030.0309.41
4.4.10.0000.0239.41
4.4.00.0000.0509.41
4.3.110.0000.0209.41
4.3.100.0030.0309.41
4.3.90.0070.0239.41
4.3.80.0000.0579.41
4.3.70.0000.0139.41
4.3.60.0000.0179.41
4.3.50.0000.0139.41
4.3.40.0000.0309.41
4.3.30.0000.0339.41
4.3.20.0070.0139.41
4.3.10.0000.0179.41
4.3.00.0030.0139.41

preferences:
36.28 ms | 401 KiB | 5 Q