3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateMonth = '2013-02'; $dateFirstDay = new DateTime($dateMonth . '-01'); $dayOfWeekFirstDay = $dateFirstDay->format('w'); $nofDaysInMonth = $dateFirstDay->format('t'); $daysOfWeek = array( 1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat', 0 => 'Sun' ); $currentDayOfWeek = $dayOfWeekFirstDay; foreach($daysOfWeek as $dayName) { echo $dayName . "\t"; } echo "\n"; if ($currentDayOfWeek != 1) { $skipFirstDays = (0 == $currentDayOfWeek ? 6 : $currentDayOfWeek-1); echo str_pad('', $skipFirstDays*2, "*\t"); } for ($curDay = 1; $curDay <= $nofDaysInMonth; $curDay++, $currentDayOfWeek++) { if ($currentDayOfWeek == 7) { $currentDayOfWeek = 0; } $isWeekEnd = false; if ($currentDayOfWeek == 6 || $currentDayOfWeek == 0) { $isWeekEnd = true; } if (!$isWeekEnd) { echo $curDay . "\t"; } else { echo "[" . $curDay . "]\t"; } if ($currentDayOfWeek == 0) { echo "\n"; } }

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.68
8.3.50.0130.00521.96
8.3.40.0160.00618.93
8.3.30.0040.01119.07
8.3.20.0000.00720.35
8.3.10.0040.00423.69
8.3.00.0040.00422.34
8.2.180.0120.00316.63
8.2.170.0140.00022.96
8.2.160.0100.00322.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.61
8.2.110.0090.00022.08
8.2.100.0070.00417.91
8.2.90.0040.00419.21
8.2.80.0060.00318.05
8.2.70.0080.00417.75
8.2.60.0040.00417.93
8.2.50.0050.00518.07
8.2.40.0050.00518.28
8.2.30.0040.00418.18
8.2.20.0040.00417.96
8.2.10.0040.00417.96
8.2.00.0040.00418.08
8.1.280.0110.00425.92
8.1.270.0090.00022.09
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.73
8.1.230.0070.00419.22
8.1.220.0030.00517.89
8.1.210.0000.00918.77
8.1.200.0100.00017.48
8.1.190.0030.00517.65
8.1.180.0000.00918.10
8.1.170.0030.00618.61
8.1.160.0070.00022.09
8.1.150.0040.00418.73
8.1.140.0040.00417.66
8.1.130.0000.00717.84
8.1.120.0040.00417.68
8.1.110.0050.00317.72
8.1.100.0000.00817.57
8.1.90.0030.00617.66
8.1.80.0050.00217.58
8.1.70.0040.00417.53
8.1.60.0000.00817.72
8.1.50.0000.00717.70
8.1.40.0070.00017.56
8.1.30.0000.00817.71
8.1.20.0000.00817.78
8.1.10.0000.00817.69
8.1.00.0000.00817.69
8.0.300.0040.00418.77
8.0.290.0070.00017.05
8.0.280.0070.00018.53
8.0.270.0040.00417.36
8.0.260.0000.00817.16
8.0.250.0030.00317.27
8.0.240.0000.00817.28
8.0.230.0030.00317.13
8.0.220.0070.00017.15
8.0.210.0000.00717.15
8.0.200.0000.00617.10
8.0.190.0000.00717.23
8.0.180.0000.00817.20
8.0.170.0050.00317.20
8.0.160.0040.00417.13
8.0.150.0080.00017.16
8.0.140.0000.00717.20
8.0.130.0000.00813.55
8.0.120.0080.00017.13
8.0.110.0040.00417.16
8.0.100.0040.00417.07
8.0.90.0000.00817.12
8.0.80.0030.01317.22
8.0.70.0030.00517.14
8.0.60.0000.00717.22
8.0.50.0000.00717.23
8.0.30.0130.00617.23
8.0.20.0140.00517.40
8.0.10.0000.00717.33
8.0.00.0120.01217.01
7.4.330.0060.00015.16
7.4.320.0030.00316.68
7.4.300.0000.00616.75
7.4.290.0030.00316.76
7.4.280.0020.00516.70
7.4.270.0000.00816.66
7.4.260.0030.00316.73
7.4.250.0000.00816.55
7.4.240.0020.00516.75
7.4.230.0040.00416.87
7.4.220.0070.00716.82
7.4.210.0080.00616.76
7.4.200.0030.00316.69
7.4.190.0000.00716.84
7.4.160.0090.00616.71
7.4.150.0140.00317.40
7.4.140.0090.00817.86
7.4.130.0060.01116.78
7.4.120.0070.01016.78
7.4.110.0140.01016.53
7.4.100.0070.01016.73
7.4.90.0190.00416.68
7.4.80.0130.00416.50
7.4.70.0070.01116.69
7.4.60.0160.00016.73
7.4.50.0000.00916.49
7.4.40.0110.00422.77
7.4.30.0110.00616.72
7.4.00.0090.00315.33
7.3.330.0000.00513.41
7.3.320.0030.00313.34
7.3.310.0030.00316.30
7.3.300.0000.00716.52
7.3.290.0040.01116.43
7.3.280.0080.00916.45
7.3.270.0000.01917.40
7.3.260.0170.00016.62
7.3.250.0130.00816.54
7.3.240.0160.00816.50
7.3.230.0060.01116.75
7.3.210.0120.00616.78
7.3.200.0160.00619.39
7.3.190.0100.00616.51
7.3.180.0040.01316.80
7.3.170.0070.01016.49
7.3.160.0080.00816.66
7.3.120.0040.01117.15
7.3.110.0040.01117.15
7.3.100.0060.00617.15
7.3.90.0070.01017.15
7.3.80.0070.00717.15
7.3.70.0030.01217.15
7.3.60.0030.01317.15
7.3.50.0030.01217.15
7.3.40.0040.00817.15
7.3.30.0110.00317.15
7.3.20.0070.00717.15
7.3.10.0070.01017.15
7.3.00.0070.01017.15
7.2.330.0100.00816.59
7.2.320.0100.01016.82
7.2.310.0060.01216.79
7.2.300.0060.01117.05
7.2.290.0090.00916.57
7.2.240.0000.01917.15
7.2.230.0130.00317.15
7.2.220.0040.00717.15
7.2.210.0150.00017.15
7.2.200.0030.00617.15
7.2.190.0130.00017.15
7.2.180.0030.00817.15
7.2.170.0060.01017.15
7.2.160.0040.00817.15
7.2.150.0080.00817.15
7.2.140.0050.00517.15
7.2.130.0040.01117.19
7.2.120.0110.00417.15
7.2.110.0080.00417.15
7.2.100.0080.00817.15
7.2.90.0030.01217.18
7.2.80.0100.00317.32
7.2.70.0070.01117.15
7.2.60.0040.01216.99
7.2.50.0070.00417.22
7.2.40.0140.00317.16
7.2.30.0070.00717.20
7.2.20.0060.00917.15
7.2.10.0060.00317.23
7.2.00.0110.00417.15
7.1.330.0040.00717.15
7.1.320.0040.00817.15
7.1.310.0090.00617.15
7.1.300.0030.00917.15
7.1.290.0100.00317.15
7.1.280.0060.01017.15
7.1.270.0090.00617.15
7.1.260.0120.00317.15
7.1.250.0040.00717.15
7.1.200.0030.00715.96
7.1.70.0030.00717.37
7.1.60.0070.01819.32
7.1.50.0130.01317.08
7.1.00.0030.07722.43
7.0.200.0050.00216.85
7.0.140.0030.06722.04
7.0.100.0500.07019.97
7.0.90.0570.06020.01
7.0.80.0500.05320.04
7.0.70.0430.07720.02
7.0.60.0430.07719.97
7.0.50.0530.08020.36
7.0.40.0100.05320.08
7.0.30.0070.08320.05
7.0.20.0200.06320.09
7.0.10.0070.08019.99
7.0.00.0070.07020.04
5.6.280.0030.09321.00
5.6.250.0170.04320.73
5.6.240.0030.05720.55
5.6.230.0100.09020.51
5.6.220.0030.08320.66
5.6.210.0100.08320.61
5.6.200.0070.09021.05
5.6.190.0170.07321.09
5.6.180.0130.04321.04
5.6.170.0000.05721.09
5.6.160.0070.08720.95
5.6.150.0070.09021.05
5.6.140.0030.04021.14
5.6.130.0130.07021.01
5.6.120.0100.07021.04
5.6.110.0100.06021.02
5.6.100.0030.08721.16
5.6.90.0100.08320.99
5.6.80.0000.05320.33
5.6.70.0170.07020.32
5.6.60.0070.07320.39
5.6.50.0000.08320.41
5.6.40.0030.08320.37
5.6.30.0070.06320.31
5.6.20.0070.04720.38
5.6.10.0070.08320.46
5.6.00.0130.06720.29
5.5.380.0070.07720.58
5.5.370.0030.06720.43
5.5.360.0070.08020.32
5.5.350.0130.07020.39
5.5.340.0100.06320.88
5.5.330.0100.07720.89
5.5.320.0070.07320.77
5.5.310.0100.07720.94
5.5.300.0100.07720.84
5.5.290.0070.08320.82
5.5.280.0070.07720.87
5.5.270.0170.07320.86
5.5.260.0030.08020.80
5.5.250.0100.05320.75
5.5.240.0200.06720.19
5.5.230.0030.05320.26
5.5.220.0200.07020.31
5.5.210.0100.07320.28
5.5.200.0070.05020.28
5.5.190.0000.08720.25
5.5.180.0030.06720.00
5.5.160.0170.06720.25
5.5.150.0070.07020.12
5.5.140.0100.07720.19
5.5.130.0100.07320.25
5.5.120.0130.07320.20
5.5.110.0130.06720.23
5.5.100.0100.07020.09
5.5.90.0030.08020.12
5.5.80.0130.07020.11
5.5.70.0130.06720.07
5.5.60.0100.08020.16
5.5.50.0100.03720.07
5.5.40.0100.04320.04
5.5.30.0100.07320.09
5.5.20.0070.07320.16
5.5.10.0030.05320.15
5.5.00.0100.08020.04
5.4.450.0070.05719.43
5.4.440.0030.08319.31
5.4.430.0100.07719.37
5.4.420.0070.07719.35
5.4.410.0100.07019.30
5.4.400.0100.07019.04
5.4.390.0000.05018.80
5.4.380.0030.07719.06
5.4.370.0100.07719.12
5.4.360.0070.06718.96
5.4.350.0100.07019.05
5.4.340.0030.08019.03
5.4.320.0070.04019.10
5.4.310.0070.08019.19
5.4.300.0170.07019.05
5.4.290.0130.07018.94
5.4.280.0030.08019.03
5.4.270.0070.07718.81
5.4.260.0100.06318.96
5.4.250.0070.07718.78
5.4.240.0070.07319.09
5.4.230.0130.07718.94
5.4.220.0030.04718.80
5.4.210.0170.07018.94
5.4.200.0070.06319.11
5.4.190.0100.06318.97
5.4.180.0130.07018.97
5.4.170.0000.04719.04
5.4.160.0200.05719.07
5.4.150.0030.07719.21
5.4.140.0070.07316.33
5.4.130.0000.07716.38
5.4.120.0030.04716.42
5.4.110.0130.06316.50
5.4.100.0130.06316.27
5.4.90.0070.07316.29
5.4.80.0030.07316.30
5.4.70.0070.07016.48
5.4.60.0030.07016.39
5.4.50.0130.06716.24
5.4.40.0000.04716.41
5.4.30.0070.07316.36
5.4.20.0070.07016.18
5.4.10.0030.05016.41
5.4.00.0070.06715.77
5.3.290.0130.06714.64
5.3.280.0100.07314.63
5.3.270.0100.06314.58
5.3.260.0100.07314.47
5.3.250.0170.03714.61
5.3.240.0070.08014.61
5.3.230.0100.07714.55
5.3.220.0100.06714.57
5.3.210.0070.07314.57
5.3.200.0100.06714.57
5.3.190.0000.08314.40
5.3.180.0070.07014.56
5.3.170.0000.08714.43
5.3.160.0070.07314.55
5.3.150.0000.08014.52
5.3.140.0070.07014.41
5.3.130.0030.07014.56
5.3.120.0070.07314.55
5.3.110.0170.06314.56
5.3.100.0170.06014.01
5.3.90.0030.06313.87
5.3.80.0100.06313.88
5.3.70.0000.06013.99
5.3.60.0130.07013.79
5.3.50.0030.05013.82
5.3.40.0070.07713.95
5.3.30.0070.07313.78
5.3.20.0030.08013.70
5.3.10.0070.07313.52
5.3.00.0070.07013.66
5.2.170.0100.05712.52
5.2.160.0070.05712.52
5.2.150.0200.04712.52
5.2.140.0070.05312.52
5.2.130.0030.04012.52
5.2.120.0000.03712.52
5.2.110.0070.06012.52
5.2.100.0070.06012.52
5.2.90.0070.03712.52
5.2.80.0000.06012.52
5.2.70.0100.05712.52
5.2.60.0030.06312.52
5.2.50.0070.05312.52
5.2.40.0000.04012.52
5.2.30.0070.06312.52
5.2.20.0030.06312.52
5.2.10.0070.05312.52
5.2.00.0070.05712.52
5.1.60.0000.06012.52
5.1.50.0030.05012.52
5.1.40.0000.04712.52
5.1.30.0000.05712.52
5.1.20.0030.05312.52
5.1.10.0070.04312.52
5.1.00.0100.05012.52
5.0.50.0000.04712.52
5.0.40.0030.04712.52
5.0.30.0030.06712.52
5.0.20.0000.04712.52
5.0.10.0070.03312.52
5.0.00.0070.04312.52
4.4.90.0070.02012.52
4.4.80.0000.03712.52
4.4.70.0000.03712.52
4.4.60.0000.03712.52
4.4.50.0030.02012.52
4.4.40.0000.05012.52
4.4.30.0070.03012.52
4.4.20.0100.03012.52
4.4.10.0000.02012.52
4.4.00.0070.04712.52
4.3.110.0030.03012.52
4.3.100.0030.03312.52
4.3.90.0000.03712.52
4.3.80.0000.05312.52
4.3.70.0000.02312.52
4.3.60.0000.03712.52
4.3.50.0030.03312.52
4.3.40.0070.04312.52
4.3.30.0000.02312.52
4.3.20.0000.03712.52
4.3.10.0000.03712.52
4.3.00.0000.02312.52

preferences:
36.12 ms | 400 KiB | 5 Q