3v4l.org

run code in 300+ PHP versions simultaneously
<?php $workdays = array(); $type = CAL_GREGORIAN; $month = date('n'); // Month ID, 1 through to 12. $year = date('Y'); // Year in 4 digit 2009 format. $day_count = cal_days_in_month($type, $month, $year); // Get the amount of days $current_date = date('Y/n/j'); //loop through all days for ($i = 1; $i <= $day_count; $i++) { $date = $year.'/'.$month.'/'.$i; //format date $get_name = date('l', strtotime($date)); //get week day $day_name = substr($get_name, 0, 3); // Trim day name to 3 chars //if not a weekend add day to array if($day_name != 'Sun' && $day_name != 'Sat' && $date <= $current_date){ $workdays[] = $date; } } foreach($workdays as $bd){ echo $bd.'<br>'; }

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.00716.59
8.3.50.0040.01521.95
8.3.40.0130.00318.83
8.3.30.0090.00918.47
8.3.20.0040.00419.06
8.3.10.0060.00321.66
8.3.00.0080.00021.02
8.2.180.0070.01125.92
8.2.170.0040.01118.88
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00518.03
8.2.120.0080.00026.35
8.2.110.0040.00820.56
8.2.100.0080.00417.78
8.2.90.0000.00819.21
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0080.00017.80
8.2.50.0040.00418.22
8.2.40.0000.00820.61
8.2.30.0040.00419.38
8.2.20.0060.00317.77
8.2.10.0040.00418.18
8.2.00.0000.00718.08
8.1.280.0110.00425.92
8.1.270.0000.00823.70
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0030.00622.02
8.1.230.0110.00020.85
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.48
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0030.00518.70
8.1.160.0000.00820.84
8.1.150.0030.00518.85
8.1.140.0040.00419.57
8.1.130.0080.00017.63
8.1.120.0000.00717.51
8.1.110.0040.00417.43
8.1.100.0040.00417.45
8.1.90.0040.00417.47
8.1.80.0070.00017.52
8.1.70.0000.00717.50
8.1.60.0080.00017.63
8.1.50.0000.00817.56
8.1.40.0030.00517.51
8.1.30.0040.00417.65
8.1.20.0030.00617.51
8.1.10.0050.00317.64
8.1.00.0050.00517.48
8.0.300.0000.00818.77
8.0.290.0000.00916.88
8.0.280.0000.00718.36
8.0.270.0000.00717.23
8.0.260.0000.00617.27
8.0.250.0030.00317.08
8.0.240.0030.00317.04
8.0.230.0030.00316.94
8.0.220.0040.00416.98
8.0.210.0050.00217.02
8.0.200.0070.00317.00
8.0.190.0030.00316.99
8.0.180.0070.00016.96
8.0.170.0000.00716.97
8.0.160.0050.00317.06
8.0.150.0000.00716.83
8.0.140.0030.00616.93
8.0.130.0030.00313.41
8.0.120.0030.00516.93
8.0.110.0020.00516.97
8.0.100.0040.00417.02
8.0.90.0000.00716.95
8.0.80.0060.00916.89
8.0.70.0030.00316.80
8.0.60.0000.00716.86
8.0.50.0070.00017.02
8.0.30.0070.01317.05
8.0.20.0160.00617.40
8.0.10.0050.00317.15
8.0.00.0170.00716.74
7.4.330.0050.00016.66
7.4.320.0030.00516.60
7.4.300.0030.00316.66
7.4.290.0000.00716.59
7.4.280.0040.00416.63
7.4.270.0040.00416.53
7.4.260.0030.00516.47
7.4.250.0040.00416.55
7.4.240.0070.00016.64
7.4.230.0000.00816.52
7.4.220.0120.01516.71
7.4.210.0120.00916.61
7.4.200.0050.00216.64
7.4.160.0230.00016.55
7.4.150.0060.01217.40
7.4.140.0060.01417.86
7.4.130.0100.00616.61
7.4.120.0050.01216.66
7.4.110.0060.01216.55
7.4.100.0100.00616.70
7.4.90.0040.01416.52
7.4.80.0090.00919.39
7.4.70.0070.01016.57
7.4.60.0100.01016.68
7.4.50.0030.01416.44
7.4.40.0140.00316.66
7.4.30.0110.00616.71
7.4.00.0000.01415.22
7.3.330.0050.00513.08
7.3.320.0000.00513.26
7.3.310.0040.00416.40
7.3.300.0000.00716.32
7.3.290.0060.01016.36
7.3.280.0110.00816.38
7.3.270.0060.01117.40
7.3.260.0110.00616.49
7.3.250.0100.00716.55
7.3.240.0100.00916.63
7.3.230.0060.01016.47
7.3.210.0120.00416.35
7.3.200.0080.00816.52
7.3.190.0060.00916.51
7.3.180.0140.00316.34
7.3.170.0100.00716.55
7.3.160.0100.00716.38
7.2.330.0060.01016.85
7.2.320.0140.00616.78
7.2.310.0200.00316.54
7.2.300.0090.00816.59
7.2.290.0160.00016.54
7.2.60.0060.01016.93
7.2.00.0060.00619.47
7.1.200.0240.00715.62
7.1.100.0100.00718.61
7.1.70.0060.00917.45
7.1.60.0180.00719.21
7.1.00.0000.08022.40
7.0.200.0130.01015.26
7.0.80.0630.07020.01
7.0.70.0570.08319.94
7.0.60.0630.07319.96
7.0.50.0470.06320.32
7.0.40.0000.06020.02
7.0.30.0070.08720.11
7.0.20.0100.06320.09
7.0.10.0030.06019.98
7.0.00.0170.07320.14
5.6.280.0100.06720.82
5.6.230.0100.08020.60
5.6.220.0000.05020.57
5.6.210.0070.08320.58
5.6.200.0030.08021.06
5.6.190.0100.05021.00
5.6.180.0100.06321.11
5.6.170.0100.06321.09
5.6.160.0130.05021.05
5.6.150.0100.08021.06
5.6.140.0100.07720.95
5.6.130.0070.08320.95
5.6.120.0070.07721.01
5.6.110.0100.07321.02
5.6.100.0100.08321.02
5.6.90.0070.07720.93
5.6.80.0100.08020.44
5.6.70.0100.07320.38
5.6.60.0070.04720.39
5.6.50.0100.08020.46
5.6.40.0100.05020.49
5.6.30.0200.06320.47
5.6.20.0170.06720.43
5.6.10.0030.05020.46
5.6.00.0100.08020.29
5.5.370.0030.06320.40
5.5.360.0130.06720.35
5.5.350.0070.08720.40
5.5.340.0170.07020.64
5.5.330.0070.08020.77
5.5.320.0030.08720.86
5.5.310.0100.07720.88
5.5.300.0070.06020.77
5.5.290.0100.07720.82
5.5.280.0070.08320.93
5.5.270.0100.04320.86
5.5.260.0070.08320.92
5.5.250.0070.05720.68
5.5.240.0200.06720.26
5.5.230.0030.08720.01
5.5.220.0070.08020.24
5.5.210.0030.05020.30
5.5.200.0070.08020.24
5.5.190.0030.08720.11
5.5.180.0170.05319.99
5.5.160.0100.07720.21
5.5.150.0030.07320.14
5.5.140.0000.08319.98
5.5.130.0100.07720.23
5.5.120.0070.08020.26
5.5.110.0100.07020.21
5.5.100.0100.07720.12
5.5.90.0130.06720.17
5.5.80.0070.05720.16
5.5.70.0030.08019.94
5.5.60.0100.06320.10
5.5.50.0100.06319.96
5.5.40.0100.07320.05
5.5.30.0030.08020.15
5.5.20.0130.07019.99
5.5.10.0070.07720.08
5.5.00.0030.07720.02

preferences:
61.78 ms | 401 KiB | 5 Q