3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateMonth = '2013-08'; $dateFirstDay = new DateTime($dateMonth . '-01'); $dayOfWeekFirstDay = $dateFirstDay->foramt('w'); $nofDaysInMonth = $dateFirstDay->firmat('t'); $daysOfWeek = array( 0 => 'Sun', 1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat' ); $currentDayOfWeek = $dayOfWeekFirstDay; foreach($daysOfWeek as $dayName) { echo $dayName . "\t"; } echo "\n"; if ($currentDayOfWeek != 1) { $skipFirstDays = (0 == $currentDayOfWeek ? 6 : $currentDayOfWeek-1); echo str_pad('', $skipFirstDays, " \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.0070.01316.63
8.3.50.0100.00617.42
8.3.40.0110.00418.92
8.3.30.0120.00618.96
8.3.20.0040.00418.91
8.3.10.0080.00020.73
8.3.00.0040.00419.75
8.2.180.0160.00616.63
8.2.170.0080.00822.96
8.2.160.0130.00321.96
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0030.00619.76
8.2.110.0030.00621.02
8.2.100.0090.00317.97
8.2.90.0080.00019.25
8.2.80.0050.00317.97
8.2.70.0030.00517.88
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0050.00318.15
8.2.30.0040.00418.03
8.2.20.0000.00717.86
8.2.10.0030.00517.97
8.2.00.0040.00417.98
8.1.280.0130.00325.92
8.1.270.0080.00024.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00422.05
8.1.230.0080.00420.83
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0030.00617.66
8.1.180.0000.00818.10
8.1.170.0080.00018.66
8.1.160.0000.00718.92
8.1.150.0000.00818.84
8.1.140.0040.00417.65
8.1.130.0070.00017.98
8.1.120.0050.00217.62
8.1.110.0050.00217.62
8.1.100.0070.00017.65
8.1.90.0040.00417.64
8.1.80.0040.00417.59
8.1.70.0070.00017.54
8.1.60.0000.00817.56
8.1.50.0000.00817.61
8.1.40.0040.00417.66
8.1.30.0040.00417.81
8.1.20.0050.00417.76
8.1.10.0090.00017.77
8.1.00.0040.00417.67
8.0.300.0070.00018.77
8.0.290.0030.00617.00
8.0.280.0030.00318.54
8.0.270.0050.00217.40
8.0.260.0070.00017.10
8.0.250.0070.00017.14
8.0.240.0060.00317.28
8.0.230.0070.00017.22
8.0.220.0000.00717.16
8.0.210.0000.00617.06
8.0.200.0000.01017.14
8.0.190.0000.00817.22
8.0.180.0020.00517.22
8.0.170.0090.00017.21
8.0.160.0040.00417.20
8.0.150.0000.01017.15
8.0.140.0030.00717.03
8.0.130.0040.00413.58
8.0.120.0040.00417.18
8.0.110.0040.00417.08
8.0.100.0070.00017.14
8.0.90.0050.00317.06
8.0.80.0100.00617.16
8.0.70.0000.00717.12
8.0.60.0000.00817.16
8.0.50.0070.00017.18
8.0.30.0090.00917.38
8.0.20.0140.00717.34
8.0.10.0040.00417.12
8.0.00.0110.01217.03
7.4.330.0030.00313.15
7.4.320.0060.00016.46
7.4.300.0030.00316.75
7.4.290.0000.00816.75
7.4.280.0000.00916.74
7.4.270.0030.00316.66
7.4.260.0070.00013.39
7.4.250.0060.00316.64
7.4.240.0030.00316.65
7.4.230.0070.00016.55
7.4.220.0090.01216.62
7.4.210.0080.00716.72
7.4.200.0050.00216.50
7.4.190.0050.00216.52
7.4.160.0130.01016.73
7.4.150.0120.00916.54
7.4.140.0060.01316.94
7.4.130.0090.00916.80
7.4.120.0080.00916.65
7.4.110.0070.01016.69
7.4.100.0100.00716.62
7.4.90.0100.01316.71
7.4.80.0070.01016.85
7.4.70.0030.01616.73
7.4.60.0040.01516.73
7.4.50.0060.00016.63
7.4.40.0110.00616.81
7.4.30.0030.01316.80
7.4.00.0100.00715.33
7.3.330.0060.00013.32
7.3.320.0060.00013.32
7.3.310.0000.00816.37
7.3.300.0030.00316.46
7.3.290.0040.01116.49
7.3.280.0070.01116.53
7.3.270.0130.00616.61
7.3.260.0090.01916.70
7.3.250.0100.01116.64
7.3.240.0070.01016.67
7.3.230.0060.01016.70
7.3.210.0030.01316.57
7.3.200.0110.00619.39
7.3.190.0140.00716.62
7.3.180.0040.01216.66
7.3.170.0130.00316.49
7.3.160.0050.01116.81
7.3.120.0090.00715.10
7.3.110.0000.01714.94
7.3.100.0120.00614.86
7.3.90.0070.01115.14
7.3.80.0100.00714.82
7.3.70.0030.00914.89
7.3.60.0060.00915.03
7.3.50.0060.00615.05
7.3.40.0060.00315.05
7.3.30.0030.00614.98
7.3.20.0000.01216.88
7.3.10.0070.00316.66
7.3.00.0030.00716.67
7.2.330.0100.00716.80
7.2.320.0130.00316.84
7.2.310.0060.01316.70
7.2.300.0090.00916.90
7.2.290.0100.00716.55
7.2.250.0130.00715.05
7.2.240.0070.01315.21
7.2.230.0110.00415.20
7.2.220.0060.00615.12
7.2.210.0120.00315.46
7.2.200.0040.00815.09
7.2.190.0000.01415.25
7.2.180.0090.00415.16
7.2.170.0080.00615.07
7.2.60.0100.00317.06
7.2.00.0080.00519.62
7.1.330.0040.01115.69
7.1.320.0070.00316.02
7.1.310.0000.01516.01
7.1.300.0030.01215.86
7.1.290.0060.00315.89
7.1.280.0030.01015.74
7.1.270.0090.00315.52
7.1.260.0090.00615.84
7.1.200.0030.01015.84
7.1.100.0070.00718.29
7.1.70.0060.00917.21
7.1.60.0140.01119.40
7.1.50.0060.01616.75
7.1.00.0030.07722.45
7.0.200.0000.00716.94
7.0.140.0070.06722.15
7.0.120.0030.04022.02
7.0.60.0200.06019.93
7.0.50.0200.07017.82
7.0.40.0070.04320.23
7.0.30.0070.05720.13
7.0.20.0070.07720.20
7.0.10.0100.06719.95
7.0.00.0070.05020.14
5.6.280.0100.06720.89
5.6.210.0170.07020.48
5.6.200.0070.08018.11
5.6.190.0070.04720.48
5.6.180.0030.05020.55
5.6.170.0000.06720.32
5.6.160.0170.06720.55
5.6.150.0070.08320.10
5.6.140.0070.06020.18
5.6.130.0070.08320.17
5.6.120.0070.08720.16
5.6.110.0170.08020.14
5.6.100.0130.07320.46
5.6.90.0030.08020.38
5.6.80.0000.04719.73
5.6.70.0100.05319.75
5.6.60.0100.04719.75
5.6.50.0170.07019.66
5.6.40.0000.06019.46
5.6.30.0130.06319.63
5.6.20.0100.04319.79
5.6.10.0100.08019.72
5.6.00.0100.06319.46
5.5.350.0030.03020.53
5.5.340.0000.07718.02
5.5.330.0100.08020.46
5.5.320.0130.07020.36
5.5.310.0030.04720.43
5.5.300.0070.04720.23
5.5.290.0070.07719.90
5.5.280.0070.08320.25
5.5.270.0100.06319.92
5.5.260.0130.08020.12
5.5.250.0000.08019.95
5.5.240.0000.08719.52
5.5.230.0100.07019.28
5.5.220.0030.09019.28
5.5.210.0100.04719.63
5.5.200.0200.07019.60
5.5.190.0070.07319.49
5.5.180.0070.07319.52
5.5.160.0070.07319.31
5.5.150.0130.06319.55
5.5.140.0200.06719.31
5.5.130.0100.07319.60
5.5.120.0030.05719.47
5.5.110.0100.03719.24
5.5.100.0070.07719.24
5.5.90.0100.07319.18
5.5.80.0100.08019.45
5.5.70.0030.04319.37
5.5.60.0070.04019.23
5.5.50.0100.05719.35
5.5.40.0130.05719.43
5.5.30.0070.06719.40
5.5.20.0170.05319.40
5.5.10.0030.05019.28
5.5.00.0070.07719.45
5.4.450.0070.08719.25
5.4.440.0130.07319.14
5.4.430.0030.09319.49
5.4.420.0070.08019.46
5.4.410.0100.07319.11
5.4.400.0070.08719.16
5.4.390.0170.04719.11
5.4.380.0100.07719.14
5.4.370.0070.07319.14
5.4.360.0000.05319.18
5.4.350.0030.03719.09
5.4.340.0100.07719.18
5.4.320.0070.04018.91
5.4.310.0070.03719.08
5.4.300.0070.05318.91
5.4.290.0130.07719.11
5.4.280.0130.05319.18
5.4.270.0000.04018.80
5.4.260.0000.04319.00
5.4.250.0100.04319.13
5.4.240.0030.07019.11
5.4.230.0100.07319.07
5.4.220.0070.07719.17
5.4.210.0100.06019.11
5.4.200.0000.05019.17
5.4.190.0070.07719.17
5.4.180.0170.06019.07
5.4.170.0100.03319.13
5.4.160.0070.04718.90
5.4.150.0030.07718.90
5.4.140.0230.06316.41
5.4.130.0030.06716.41
5.4.120.0130.05716.48
5.4.110.0070.03316.34
5.4.100.0070.03316.38
5.4.90.0100.03316.36
5.4.80.0070.03316.29
5.4.70.0000.04316.18
5.4.60.0070.03016.37
5.4.50.0030.03316.28
5.4.40.0000.03716.22
5.4.30.0000.03716.36
5.4.20.0030.03316.24
5.4.10.0030.03316.34
5.4.00.0070.03015.77
5.3.290.0100.03314.61
5.3.280.0130.06314.57
5.3.270.0100.03714.50
5.3.260.0000.05314.54
5.3.250.0030.05714.40
5.3.240.0070.06714.58
5.3.230.0070.05714.53
5.3.220.0030.04014.50
5.3.210.0030.03714.48
5.3.200.0030.03714.50
5.3.190.0000.04014.39
5.3.180.0030.03714.52
5.3.170.0000.04014.39
5.3.160.0000.04014.50
5.3.150.0070.03314.39
5.3.140.0000.03714.52
5.3.130.0000.04014.57
5.3.120.0070.03714.48
5.3.110.0030.03714.57
5.3.100.0000.06013.98
5.3.90.0300.02013.96
5.3.80.0130.02713.82
5.3.70.0030.03713.91
5.3.60.0000.04013.80
5.3.50.0030.04013.89
5.3.40.0030.03313.88
5.3.30.0000.03713.86
5.3.20.0070.03013.68
5.3.10.0070.03013.68
5.3.00.0030.03313.58
5.2.170.0030.03011.24
5.2.160.0030.03011.14
5.2.150.0070.02311.14
5.2.140.0070.02311.31
5.2.130.0030.02711.05
5.2.120.0070.02311.27
5.2.110.0030.02711.20
5.2.100.0070.02311.02
5.2.90.0000.03011.09
5.2.80.0030.02710.99
5.2.70.0000.03011.11
5.2.60.0000.03011.00
5.2.50.0000.03310.92
5.2.40.0000.03011.02
5.2.30.0070.02310.97
5.2.20.0000.03010.86
5.2.10.0030.02710.92
5.2.00.0030.03310.74
5.1.60.0000.02310.00
5.1.50.0030.0239.98
5.1.40.0000.0379.94
5.1.30.0070.05010.33
5.1.20.0070.05310.36
5.1.10.0030.02710.07
5.1.00.0030.02310.23
5.0.50.0000.0238.58
5.0.40.0070.0208.42
5.0.30.0070.0538.30
5.0.20.0000.0338.23
5.0.10.0030.0408.32
5.0.00.0030.0408.12
4.4.90.0000.0137.70
4.4.80.0000.0137.70
4.4.70.0030.0137.70
4.4.60.0000.0177.70
4.4.50.0000.0137.70
4.4.40.0030.0237.70
4.4.30.0000.0177.70
4.4.20.0000.0207.70
4.4.10.0000.0407.70
4.4.00.0000.0507.70
4.3.110.0000.0377.70
4.3.100.0030.0307.70
4.3.90.0000.0237.70
4.3.80.0000.0377.70
4.3.70.0030.0177.70
4.3.60.0070.0307.70
4.3.50.0000.0337.70
4.3.40.0030.0507.70
4.3.30.0000.0377.70
4.3.20.0070.0337.70
4.3.10.0030.0237.70
4.3.00.0030.0237.70

preferences:
35.34 ms | 401 KiB | 5 Q