3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 1; // Start $y = 10; // Iterations Needed $days = []; //Empty Array while($x <= $y) { // Set Buffer $buffer = 2 + $x; // Get Date with Buffer $date = date(strtotime("+$buffer days")); // If the day is a weeday if(date('N', $date) < 6){ // Add to array $days[$date] = date("l, jS M", $date); // If not, increase max iteration (example: 10 to 11) }else{ $y++; } // Go to next loop $x++; } echo "<pre>"; print_r($days);

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.0040.01218.58
8.3.50.0070.00718.40
8.3.40.0110.00718.84
8.3.30.0140.00018.63
8.3.20.0040.00720.79
8.3.10.0040.00423.68
8.3.00.0030.00523.61
8.2.180.0120.00925.92
8.2.170.0070.00719.17
8.2.160.0070.00722.96
8.2.150.0080.00024.18
8.2.140.0040.01424.66
8.2.130.0000.00920.58
8.2.120.0050.00326.35
8.2.110.0030.00622.37
8.2.100.0120.00018.16
8.2.90.0000.00920.63
8.2.80.0080.00019.27
8.2.70.0080.00017.93
8.2.60.0050.00318.34
8.2.50.0040.00418.10
8.2.40.0030.00519.47
8.2.30.0070.00019.34
8.2.20.0040.00418.32
8.2.10.0060.00319.50
8.2.00.0040.00418.30
8.1.280.0090.00625.92
8.1.270.0100.00019.08
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00622.59
8.1.230.0070.00420.89
8.1.220.0080.00017.89
8.1.210.0060.00318.93
8.1.200.0030.00517.73
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0060.00318.84
8.1.160.0000.00719.03
8.1.150.0040.00419.03
8.1.140.0050.00219.02
8.1.130.0000.00717.67
8.1.120.0070.00017.74
8.1.110.0080.00017.67
8.1.100.0040.00417.60
8.1.90.0000.00817.72
8.1.80.0030.00517.73
8.1.70.0040.00417.64
8.1.60.0030.00517.69
8.1.50.0000.01017.70
8.1.40.0000.00817.71
8.1.30.0040.00417.75
8.1.20.0080.00017.86
8.1.10.0070.00017.66
8.1.00.0000.00817.80
8.0.300.0070.00020.02
8.0.290.0080.00316.88
8.0.280.0000.00818.47
8.0.270.0030.00516.99
8.0.260.0030.00317.06
8.0.250.0000.00717.14
8.0.240.0080.00017.13
8.0.230.0070.00017.25
8.0.220.0040.00417.20
8.0.210.0070.00017.16
8.0.200.0030.00317.24
8.0.190.0000.00717.24
8.0.180.0040.00417.16
8.0.170.0030.00617.18
8.0.160.0050.00317.09
8.0.150.0050.00317.03
8.0.140.0040.00417.08
8.0.130.0030.00313.49
8.0.120.0040.00417.07
8.0.110.0000.00717.20
8.0.100.0000.00717.02
8.0.90.0000.00717.19
8.0.80.0110.00517.05
8.0.70.0040.00417.04
8.0.60.0060.00316.96
8.0.50.0040.00416.93
8.0.30.0090.00917.35
8.0.20.0090.00917.40
8.0.10.0040.00417.34
8.0.00.0160.00317.05
7.4.330.0000.00615.55
7.4.320.0060.00016.69
7.4.300.0030.00316.77
7.4.290.0000.00716.63
7.4.280.0040.00416.69
7.4.270.0030.00516.75
7.4.260.0030.00316.82
7.4.250.0040.00416.70
7.4.240.0030.00316.80
7.4.230.0000.00816.59
7.4.220.0040.00416.50
7.4.210.0050.01116.82
7.4.200.0070.00016.59
7.4.160.0080.01016.81
7.4.140.0120.00717.86
7.4.130.0100.00716.76
7.4.120.0090.01316.64
7.4.110.0090.00916.68
7.4.100.0110.00616.79
7.4.90.0070.01016.64
7.4.80.0120.00819.39
7.4.70.0060.01116.61
7.4.60.0120.01316.77
7.4.50.0060.00916.89
7.4.40.0070.01116.58
7.4.00.0060.00915.23
7.3.330.0000.00513.28
7.3.320.0000.00813.36
7.3.310.0050.00316.37
7.3.300.0000.00716.55
7.3.290.0040.00416.43
7.3.280.0060.01216.52
7.3.260.0120.00916.77
7.3.230.0080.00816.53
7.3.210.0100.01316.86
7.3.200.0060.01516.89
7.3.190.0090.00916.78
7.3.180.0000.01616.86
7.3.170.0030.01416.79
7.3.160.0120.00616.79
7.3.10.0300.00615.20
7.3.00.0540.00314.96
7.2.330.0100.00716.64
7.2.320.0150.00616.98
7.2.310.0060.01116.86
7.2.300.0090.00916.66
7.2.290.0090.00716.85
7.2.130.0480.00715.30
7.2.120.0350.00515.30
7.2.110.0370.00615.33
7.2.100.0400.00315.25
7.2.90.0370.00315.36
7.2.80.0450.00515.29
7.2.70.0400.00715.22
7.2.60.0370.00615.39
7.2.50.0390.00815.23
7.2.40.0560.00315.30
7.2.30.0360.00315.12
7.2.20.0410.00615.20
7.2.10.0390.00915.28
7.2.00.0440.01015.26
7.1.250.0520.00614.09

preferences:
34.52 ms | 401 KiB | 5 Q