3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* the difference in days between today and '$delay' number business days (M-F). yes. */ function g($current_day, $delay) { /* wraps around to the next day which is '$delay' number of business days from today lol, math */ if(($current_day+$delay) > 5) return abs((7+(((min($current_day, 5)+($delay-1))%5)+1)) - $current_day); else return $delay; } function f($current_day, $delay) { return (((min($current_day, 5)+($delay-1))%5)+1); } for($i = 1; $i < 8; $i++) printf("\tf(%d, 1) => %d\n", $i, f($i, 1)); printf("\n\n\n\n"); for($i = 1; $i < 8; $i++) printf("\tf(%d, 2) => %d\n", $i, f($i, 2));

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.0160.00318.43
8.3.50.0190.00522.00
8.3.40.0060.00918.47
8.3.30.0100.00718.93
8.3.20.0000.00820.34
8.3.10.0040.00420.48
8.3.00.0040.00419.38
8.2.180.0180.00016.75
8.2.170.0120.00322.96
8.2.160.0140.00020.35
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00022.05
8.2.110.0080.00022.16
8.2.100.0090.00317.91
8.2.90.0040.00419.07
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0090.00017.93
8.2.50.0030.00718.07
8.2.40.0000.00818.12
8.2.30.0040.00419.45
8.2.20.0080.00017.75
8.2.10.0030.00518.05
8.2.00.0080.00017.66
8.1.280.0100.00725.92
8.1.270.0000.00822.24
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0110.00019.09
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0070.00417.35
8.1.190.0000.00817.11
8.1.180.0080.00318.10
8.1.170.0000.00818.54
8.1.160.0040.00421.92
8.1.150.0080.00018.83
8.1.140.0080.00017.48
8.1.130.0000.00717.77
8.1.120.0070.00017.32
8.1.110.0040.00417.39
8.1.100.0040.00417.45
8.1.90.0000.00717.40
8.1.80.0020.00517.42
8.1.70.0000.00717.32
8.1.60.0030.00617.50
8.1.50.0040.00417.48
8.1.40.0000.00917.42
8.1.30.0000.00817.59
8.1.20.0040.00417.54
8.1.10.0040.00417.54
8.1.00.0000.00817.38
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0040.00418.46
8.0.270.0080.00017.14
8.0.260.0050.00317.31
8.0.250.0000.00716.95
8.0.240.0000.00716.85
8.0.230.0050.00316.90
8.0.220.0070.00016.87
8.0.210.0080.00016.91
8.0.200.0000.00716.92
8.0.190.0000.00916.86
8.0.180.0000.00716.92
8.0.170.0040.00416.95
8.0.160.0030.00316.91
8.0.150.0070.00016.80
8.0.140.0050.00216.82
8.0.130.0060.00013.32
8.0.120.0000.00716.75
8.0.110.0040.00416.93
8.0.100.0030.00516.75
8.0.90.0000.00816.82
8.0.80.0100.01316.86
8.0.70.0070.00016.88
8.0.60.0040.00416.77
8.0.50.0000.00716.77
8.0.30.0070.01217.24
8.0.20.0100.01017.40
8.0.10.0080.00016.92
8.0.00.0150.00516.66
7.4.330.0030.00315.00
7.4.320.0030.00316.59
7.4.300.0000.00616.59
7.4.290.0000.00716.54
7.4.280.0040.00416.53
7.4.270.0030.00316.64
7.4.260.0060.00016.55
7.4.250.0040.00416.52
7.4.240.0030.00516.60
7.4.230.0030.00316.62
7.4.220.0090.00916.49
7.4.210.0070.00716.39
7.4.200.0070.00016.63
7.4.160.0040.01116.46
7.4.150.0060.01317.40
7.4.140.0150.00317.86
7.4.130.0060.01116.48
7.4.120.0120.00616.57
7.4.110.0120.00416.40
7.4.100.0130.00516.65
7.4.90.0110.00516.61
7.4.80.0100.00719.39
7.4.70.0100.01716.45
7.4.60.0060.00916.44
7.4.50.0040.00416.56
7.4.40.0130.00316.59
7.4.30.0050.01116.41
7.4.10.0110.00714.90
7.4.00.0070.00714.93
7.3.330.0040.00413.32
7.3.320.0000.00713.18
7.3.310.0030.00316.31
7.3.300.0000.00816.27
7.3.290.0090.00616.23
7.3.280.0060.00916.32
7.3.270.0060.01017.40
7.3.260.0060.01516.77
7.3.250.0100.00716.37
7.3.240.0070.01016.53
7.3.230.0130.00316.63
7.3.210.0030.01316.33
7.3.200.0090.01219.39
7.3.190.0110.01116.44
7.3.180.0100.00716.47
7.3.170.0090.00616.29
7.3.160.0090.00616.39
7.3.130.0110.00614.83
7.3.120.0040.01414.89
7.3.110.0100.00914.91
7.3.100.0040.01114.84
7.3.90.0070.00714.87
7.3.80.0060.00814.78
7.3.70.0020.00914.68
7.3.60.0120.00014.88
7.3.50.0070.00514.52
7.3.40.0070.00414.81
7.3.30.0100.00314.64
7.3.20.0040.00816.80
7.3.10.0050.00716.62
7.3.00.0060.00616.75
7.2.330.0030.01516.80
7.2.320.0100.01616.75
7.2.310.0030.01616.34
7.2.300.0060.01016.43
7.2.290.0150.00716.54
7.2.260.0100.01014.98
7.2.250.0090.00915.13
7.2.240.0040.01015.00
7.2.230.0070.00614.95
7.2.220.0070.00815.10
7.2.210.0050.00715.12
7.2.200.0060.00815.05
7.2.190.0080.00515.11
7.2.180.0050.01014.88
7.2.170.0030.00714.94
7.2.160.0060.00714.77
7.2.150.0070.00716.66
7.2.140.0050.00816.74
7.2.130.0070.00716.89
7.2.120.0060.00716.83
7.2.110.0060.00716.71
7.2.100.0100.00516.80
7.2.90.0060.00716.74
7.2.80.0050.00816.85
7.2.70.0100.00516.79
7.2.60.0050.01016.93
7.2.50.0060.00916.73
7.2.40.0060.00816.86
7.2.30.0060.00916.83
7.2.20.0080.00616.77
7.2.10.0040.00916.74
7.2.00.0060.00617.42
7.1.330.0060.00615.93
7.1.320.0080.00515.93
7.1.310.0070.00715.86
7.1.300.0050.00815.84
7.1.290.0100.00115.84
7.1.280.0050.00815.60
7.1.270.0050.00815.68
7.1.260.0060.00615.59
7.1.250.0070.00515.64
7.1.240.0070.00715.44
7.1.230.0030.01015.77
7.1.220.0060.00715.57
7.1.210.0020.01315.70
7.1.200.0050.00615.73
7.1.190.0030.01015.75
7.1.180.0100.00515.86
7.1.170.0020.01115.80
7.1.160.0070.00415.66
7.1.150.0080.00315.77
7.1.140.0060.01015.78
7.1.130.0090.00515.72
7.1.120.0050.00715.57
7.1.110.0100.00415.77
7.1.100.0040.00916.59
7.1.90.0030.01015.83
7.1.80.0070.00815.99
7.1.70.0050.00716.32
7.1.60.0060.01216.91
7.1.50.0080.00916.21
7.1.40.0020.01215.73
7.1.30.0080.00515.82
7.1.20.0030.00615.88
7.1.10.0060.00515.81
7.1.00.0060.02817.96
7.0.330.0090.00415.38
7.0.320.0060.00815.32
7.0.310.0030.00815.51
7.0.300.0050.01015.32
7.0.290.0100.00315.37
7.0.280.0090.00815.13
7.0.270.0020.01115.28
7.0.260.0110.00215.26
7.0.250.0030.01115.39
7.0.240.0060.00715.28
7.0.230.0040.00615.31
7.0.220.0060.00515.15
7.0.210.0000.01315.21
7.0.200.0050.00715.73
7.0.190.0060.00615.45
7.0.180.0030.01215.45
7.0.170.0040.00915.38
7.0.160.0080.00515.43
7.0.150.0060.00615.40
7.0.140.0060.02917.53
7.0.130.0030.01115.26
7.0.120.0070.00715.52
7.0.110.0060.00615.47
7.0.100.0060.00615.18
7.0.90.0010.00915.37
7.0.80.0070.00615.30
7.0.70.0040.00815.46
7.0.60.0090.02216.95
7.0.50.0050.01816.32
7.0.40.0060.03115.66
7.0.30.0080.02315.75
7.0.20.0130.03115.63
7.0.10.0040.02315.69
7.0.00.0070.02115.71
5.6.400.0070.01014.24
5.6.390.0060.00814.22
5.6.380.0040.01014.10
5.6.370.0030.00814.05
5.6.360.0050.00814.10
5.6.350.0070.00614.04
5.6.340.0060.00614.28
5.6.330.0090.00714.16
5.6.320.0070.00714.31
5.6.310.0100.00514.46
5.6.300.0040.00714.36
5.6.290.0070.00614.38
5.6.280.0050.02916.46
5.6.270.0080.00414.36
5.6.260.0100.00514.27
5.6.250.0080.00314.21
5.6.240.0080.00714.20
5.6.230.0030.01214.48
5.6.220.0080.00514.23
5.6.210.0100.01616.32
5.6.200.0130.02615.54
5.6.190.0070.01816.51
5.6.180.0110.02116.39
5.6.170.0150.02616.33
5.6.160.0050.01716.22
5.6.150.0060.01815.44
5.6.140.0070.02015.55
5.6.130.0030.02015.52
5.6.120.0060.02216.50
5.6.110.0060.03116.39
5.6.100.0050.03416.58
5.6.90.0070.03216.56
5.6.80.0050.03216.27
5.6.70.0060.00814.36
5.6.60.0060.00914.16
5.6.50.0030.01014.13
5.6.40.0080.00614.14
5.6.30.0040.00814.12
5.6.20.0110.00514.13
5.6.10.0070.00914.35
5.6.00.0040.01114.24
5.5.380.0050.01014.15
5.5.370.0100.00714.18
5.5.360.0070.01014.44
5.5.350.1480.01616.28
5.5.340.0050.01915.53
5.5.330.0050.03316.17
5.5.320.0190.02016.36
5.5.310.0120.02016.34
5.5.300.0070.03015.29
5.5.290.0050.02115.33
5.5.280.0080.01716.39
5.5.270.0080.03316.44
5.5.260.0090.03016.46
5.5.250.0110.03116.43
5.5.240.0050.02016.15
5.5.230.0060.01214.31
5.5.220.0090.00814.08
5.5.210.0090.00914.21
5.5.200.0130.00514.31
5.5.190.0050.01014.18
5.5.180.0090.00714.33
5.5.170.0100.00714.04
5.5.160.0100.00714.02
5.5.150.0100.00813.97
5.5.140.0060.01014.18
5.5.130.0130.00114.12
5.5.120.0070.01114.18
5.5.110.0110.00714.15
5.5.100.0070.01014.23
5.5.90.0090.00714.33
5.5.80.0090.00913.88
5.5.70.0070.01113.86
5.5.60.0110.00614.02
5.5.50.0080.00714.14
5.5.40.0100.00514.01
5.5.30.0030.01014.20
5.5.20.0040.01213.82
5.5.10.0030.01214.06
5.5.00.0040.00914.24
5.4.450.0160.02013.95
5.4.440.0270.01614.00
5.4.430.0110.02013.91
5.4.420.0190.02013.97
5.4.410.0220.01913.95
5.4.400.0190.01414.00
5.4.390.0230.01713.93
5.4.380.0160.02213.69
5.4.370.0200.02213.75
5.4.360.0150.02513.68
5.4.350.0150.02913.57
5.4.340.0190.02813.67
5.4.330.0080.00611.27
5.4.320.0060.01711.61
5.4.310.0050.02011.58
5.4.300.0050.01811.54
5.4.290.0060.01711.58
5.4.280.0080.01611.63
5.4.270.0080.01511.54
5.4.260.0060.02111.55
5.4.250.0040.02011.59
5.4.240.0060.01611.50
5.4.230.0080.01711.61
5.4.220.0030.01911.48
5.4.210.0080.01311.59
5.4.200.0060.01511.59
5.4.190.0060.01711.60
5.4.180.0060.01711.56
5.4.170.0090.01711.59
5.4.160.0070.01511.60
5.4.150.0070.02111.59
5.4.140.0070.01611.39
5.4.130.0070.01611.44
5.4.120.0050.01811.47
5.4.110.0030.01911.52
5.4.100.0030.01811.47
5.4.90.0090.01411.48
5.4.80.0040.01911.49
5.4.70.0060.01611.52
5.4.60.0040.02011.47
5.4.50.0050.01711.50
5.4.40.0080.01611.50
5.4.30.0050.01811.51
5.4.20.0070.01411.46
5.4.10.0080.01411.42
5.4.00.0070.01711.23
5.3.290.0040.04712.80
5.3.280.0060.04012.70
5.3.270.0060.04212.73
5.3.260.0060.03812.72
5.3.250.0060.03712.72
5.3.240.0040.03812.72
5.3.230.0040.03812.71
5.3.220.0030.03912.68
5.3.210.0060.03912.68
5.3.200.0080.03312.68
5.3.190.0080.03512.68
5.3.180.0030.04012.67
5.3.170.0050.03712.66
5.3.160.0060.03612.68
5.3.150.0050.03712.68
5.3.140.0070.03512.66
5.3.130.0050.04012.66
5.3.120.0020.04212.66
5.3.110.0040.04112.66
5.3.100.0060.04012.12
5.3.90.0060.03812.10
5.3.80.0090.03412.10
5.3.70.0060.03712.09
5.3.60.0050.03712.08
5.3.50.0050.04212.03
5.3.40.0070.03712.03
5.3.30.0060.03611.99
5.3.20.0040.03811.77
5.3.10.0050.03611.73
5.3.00.0060.03611.72
5.2.170.0050.0309.23
5.2.160.0070.0279.23
5.2.150.0060.0299.23
5.2.140.0060.0299.22
5.2.130.0050.0289.18
5.2.120.0060.0279.18
5.2.110.0060.0279.19
5.2.100.0040.0289.19
5.2.90.0040.0309.18
5.2.80.0060.0309.18
5.2.70.0030.0349.18
5.2.60.0060.0289.13
5.2.50.0010.0339.11
5.2.40.0050.0279.08
5.2.30.0050.0299.05
5.2.20.0070.0269.04
5.2.10.0040.0278.95
5.2.00.0030.0368.81
5.1.60.0030.0268.09
5.1.50.0060.0238.09
5.1.40.0110.0268.07
5.1.30.0040.0268.42
5.1.20.0040.0278.45
5.1.10.0030.0268.17
5.1.00.0050.0248.16
5.0.50.0040.0206.65
5.0.40.0040.0196.51
5.0.30.0030.0326.32
5.0.20.0050.0186.29
5.0.10.0040.0216.26
5.0.00.0030.0376.25
4.4.90.0010.0174.78
4.4.80.0020.0164.76
4.4.70.0040.0234.76
4.4.60.0010.0214.76
4.4.50.0020.0214.77
4.4.40.0050.0234.71
4.4.30.0020.0164.76
4.4.20.0020.0174.84
4.4.10.0020.0164.85
4.4.00.0050.0224.76
4.3.110.0030.0154.67
4.3.100.0020.0164.67
4.3.90.0020.0154.63
4.3.80.0010.0264.59
4.3.70.0010.0164.63
4.3.60.0030.0144.62
4.3.50.0010.0174.63
4.3.40.0030.0244.54
4.3.30.0030.0153.31
4.3.20.0040.0143.29
4.3.10.0010.0173.24
4.3.00.0170.01319.45

preferences:
35.73 ms | 401 KiB | 5 Q