3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = array( "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември" ); $days_in_month = array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ); $current_month_index = date("n") - 1; $day_of_the_month = date("j"); $day_of_the_week = date("w"); $day_of_the_week_difference = $day_of_the_week - $day_of_the_month % 7; $elements_in_calendar = array(); for ($i = 0; $i < $day_of_the_week_difference; $i++) { array_push($elements_in_calendar, ""); } for ($i = 1; $i <= $days_in_month[$current_month_index]; $i++) { array_push($elements_in_calendar, $i); } ?> <html> <head> <style> table, td { border: 1px solid #000; text-align: center; border-collapse: collapse; } </style> </head> <body> <table> <tr> <td colspan="2"><a href="#"><?php echo $months[$current_month_index - 1] ?></a></td> <td colspan="3"><?php echo $months[$current_month_index] ?></td> <td colspan="2"><a href="#"><?php echo $months[$current_month_index + 1] ?></a></td> </tr> <tr> <td>Понеделник</td> <td>Вторник</td> <td>Сряда</td> <td>Четвъртък</td> <td>Петък</td> <td>Събота</td> <td>Неделя</td> </tr> <?php echo $day_of_the_week_difference ?> <?php for ($i = 0; $i < count($elements_in_calendar); $i++) { ?> <?php if ($i % 7 === 1) { ?> <?php if ($i != 1) { ?> </tr> <?php } ?> <tr> <?php } ?> <td><?php echo $elements_in_calendar[$i] ?></td> <?php } ?> </tr> </table> </body> </html>

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.01418.27
8.3.50.0110.00422.00
8.3.40.0110.00418.98
8.3.30.0040.01119.09
8.3.20.0000.00820.39
8.3.10.0000.00823.68
8.3.00.0060.00319.50
8.2.180.0080.01116.88
8.2.170.0130.01022.96
8.2.160.0100.00719.16
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00022.11
8.2.110.0070.00319.09
8.2.100.0070.00417.97
8.2.90.0060.00318.22
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0090.00018.16
8.2.50.0000.00918.07
8.2.40.0060.00618.10
8.2.30.0000.00918.13
8.2.20.0040.00418.02
8.2.10.0000.00718.20
8.2.00.0060.00318.07
8.1.280.0090.00625.92
8.1.270.0120.00322.19
8.1.260.0080.00026.35
8.1.250.0090.00628.09
8.1.240.0390.00020.76
8.1.230.0110.00022.26
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0080.00017.13
8.1.180.0050.00318.10
8.1.170.0090.00018.59
8.1.160.0040.00421.92
8.1.150.0040.00418.89
8.1.140.0000.00717.60
8.1.130.0030.00617.92
8.1.120.0050.00317.60
8.1.110.0030.00517.68
8.1.100.0050.00217.57
8.1.90.0000.00817.50
8.1.80.0000.00717.61
8.1.70.0000.00717.58
8.1.60.0060.00317.58
8.1.50.0080.00017.60
8.1.40.0030.00617.63
8.1.30.0050.00317.71
8.1.20.0080.00017.71
8.1.10.0000.00817.68
8.1.00.0030.00617.65
8.0.300.0040.00419.89
8.0.290.0030.00517.00
8.0.280.0000.00718.52
8.0.270.0080.00017.35
8.0.260.0080.00017.35
8.0.250.0000.00717.16
8.0.240.0030.00317.06
8.0.230.0000.00717.04
8.0.220.0000.00817.00
8.0.210.0070.00017.00
8.0.200.0000.00717.21
8.0.190.0000.00817.05
8.0.180.0070.00017.01
8.0.170.0030.00617.04
8.0.160.0000.00817.07
8.0.150.0000.00817.11
8.0.140.0040.00417.08
8.0.130.0000.00613.46
8.0.120.0040.00417.10
8.0.110.0040.00417.02
8.0.100.0070.00017.00
8.0.90.0040.00417.00
8.0.80.0120.00617.01
8.0.70.0000.00717.13
8.0.60.0030.00517.18
8.0.50.0000.00717.00
8.0.30.0080.01317.29
8.0.20.0140.00917.41
8.0.10.0050.00317.15
8.0.00.0160.00317.06
7.4.330.0030.00315.00
7.4.320.0030.00316.60
7.4.300.0060.00016.59
7.4.290.0000.00816.58
7.4.280.0040.00416.59
7.4.270.0030.00316.59
7.4.260.0030.00316.50
7.4.250.0080.00016.66
7.4.240.0030.00416.56
7.4.230.0070.00016.76
7.4.220.0110.01216.63
7.4.210.0060.00916.56
7.4.200.0000.00816.79
7.4.160.0100.00616.54
7.4.150.0170.00417.40
7.4.140.0120.00917.86
7.4.130.0160.00316.57
7.4.120.0070.01116.58
7.4.110.0060.01216.74
7.4.100.0130.00616.76
7.4.90.0080.00816.77
7.4.80.0150.00619.39
7.4.70.0070.01016.60
7.4.60.0100.00716.68
7.4.50.0070.00016.63
7.4.40.0130.00316.68
7.4.30.0130.01216.43
7.4.00.0050.01115.17
7.3.330.0050.00013.28
7.3.320.0050.00013.34
7.3.310.0030.00316.21
7.3.300.0000.00716.36
7.3.290.0110.00316.33
7.3.280.0130.00416.36
7.3.270.0190.00317.40
7.3.260.0130.00616.54
7.3.240.0030.01516.68
7.3.230.0150.00316.83
7.3.210.0130.00316.73
7.3.200.0150.00319.39
7.3.190.0130.01016.70
7.3.180.0170.00716.52
7.3.170.0040.01216.69
7.3.160.0060.01016.64
7.3.120.0070.01015.20
7.3.110.0000.01814.81
7.3.100.0090.00314.83
7.3.90.0060.00614.95
7.3.80.0030.00715.06
7.3.70.0090.00314.91
7.3.60.0030.01014.93
7.3.50.0060.00615.05
7.3.40.0100.00315.06
7.3.30.0070.00714.71
7.3.20.0000.01316.81
7.3.10.0090.00316.87
7.3.00.0120.00316.85
7.2.330.0170.00016.70
7.2.320.0100.01016.93
7.2.310.0070.01016.59
7.2.300.0090.00917.00
7.2.290.0100.00716.66
7.2.250.0070.00714.95
7.2.240.0030.01715.00
7.2.230.0120.00314.99
7.2.220.0030.00715.13
7.2.210.0050.00515.24
7.2.200.0040.01115.16
7.2.190.0110.00315.09
7.2.180.0040.00814.94
7.2.170.0030.00615.04
7.2.60.0040.01216.66
7.2.00.0040.01219.02
7.1.330.0040.01116.01
7.1.320.0070.00715.81
7.1.310.0040.01115.77
7.1.300.0120.00015.88
7.1.290.0030.00916.07
7.1.280.0080.00316.09
7.1.270.0110.00715.88
7.1.260.0100.00716.05
7.1.200.0060.00615.97
7.1.100.0060.00318.44
7.1.70.0000.00717.21
7.1.60.0070.01819.32
7.1.50.0040.01917.04
7.1.00.0030.07322.31
7.0.200.0040.00716.97
7.0.140.0030.07721.96
7.0.110.0070.08021.81
7.0.100.0000.08321.82
7.0.90.0070.05021.79
7.0.80.0100.07321.66
7.0.70.0030.07721.75
7.0.60.0000.08321.74
7.0.50.0000.08321.95
7.0.40.0070.08320.15
7.0.30.0070.07020.20
7.0.20.0030.05020.00
7.0.10.0070.08020.16
7.0.00.0030.06020.22
5.6.280.0030.07321.08
5.6.260.0100.08320.64
5.6.250.0070.08320.55
5.6.240.0000.08020.59
5.6.230.0100.08020.64
5.6.220.0030.08320.80
5.6.210.0070.07720.68
5.6.200.0030.07021.07
5.6.190.0170.06721.22
5.6.180.0000.08721.10
5.6.170.0070.07721.16
5.6.160.0070.08021.04
5.6.150.0070.08321.10
5.6.140.0030.07321.18
5.6.130.0000.09321.09
5.6.120.0070.08021.10
5.6.110.0000.08721.14
5.6.100.0070.07720.89
5.6.90.0100.06720.99
5.6.80.0130.07320.42
5.6.70.0070.05720.51
5.6.60.0070.07720.47
5.6.50.0070.06320.46
5.6.40.0070.07720.51
5.6.30.0070.07720.54
5.6.20.0070.04320.27
5.6.10.0070.03720.59
5.6.00.0030.08020.44
5.5.380.0100.07720.48
5.5.370.0030.05020.20
5.5.360.0000.07320.48
5.5.350.0000.07720.42
5.5.340.0070.06320.81
5.5.330.0070.08320.70
5.5.320.0070.07320.77
5.5.310.0130.07320.77
5.5.300.0030.08720.85
5.5.290.0030.09020.82
5.5.280.0070.07720.80
5.5.270.0030.08320.79
5.5.260.0030.07320.75
5.5.250.0100.04720.47
5.5.240.0100.06720.24
5.5.230.0030.07320.37
5.5.220.0030.07720.11
5.5.210.0070.07320.11
5.5.200.0070.07020.12
5.5.190.0030.08720.25
5.5.180.0000.08020.26
5.5.160.0100.06320.05
5.5.150.0030.07720.19
5.5.140.0030.08020.17
5.5.130.0100.07720.09
5.5.120.0030.04720.21
5.5.110.0070.06020.11
5.5.100.0100.06320.23
5.5.90.0070.07320.14
5.5.80.0030.07720.11
5.5.70.0130.07020.03
5.5.60.0100.07320.14
5.5.50.0030.07019.98
5.5.40.0000.04020.05
5.5.30.0030.04720.04
5.5.20.0170.06719.99
5.5.10.0030.06720.06
5.5.00.0130.03719.98
5.4.450.0070.08019.36
5.4.440.0130.07719.33
5.4.430.0000.08019.42
5.4.420.0030.04319.32
5.4.410.0070.07019.37
5.4.400.0100.07019.03
5.4.390.0070.07718.93
5.4.380.0000.07718.93
5.4.370.0070.06318.95
5.4.360.0030.04719.03
5.4.350.0000.08019.10
5.4.340.0030.04018.97
5.4.320.0000.05018.93
5.4.310.0030.07318.90
5.4.300.0030.07718.93
5.4.290.0100.05319.09
5.4.280.0070.07019.03
5.4.270.0070.06319.10
5.4.260.0000.07319.07
5.4.250.0070.06019.11
5.4.240.0100.07018.94
5.4.230.0030.06018.94
5.4.220.0070.05719.02
5.4.210.0030.04319.09
5.4.200.0030.08019.04
5.4.190.0000.06319.24
5.4.180.0070.06018.94
5.4.170.0100.06718.98
5.4.160.0000.06719.00
5.4.150.0030.07719.00
5.4.140.0000.07716.54
5.4.130.0100.06316.34
5.4.120.0000.07316.23
5.4.110.0030.07016.43
5.4.100.0030.07016.58
5.4.90.0100.06716.41
5.4.80.0030.07016.41
5.4.70.0000.04316.22
5.4.60.0070.03716.37
5.4.50.0000.07316.46
5.4.40.0030.06316.16
5.4.30.0000.07316.37
5.4.20.0000.05716.46
5.4.10.0000.04716.51
5.4.00.0070.07015.88
5.3.290.0100.07314.56
5.3.280.0070.07014.71
5.3.270.0030.07314.69
5.3.260.0000.06314.68
5.3.250.0100.06714.49
5.3.240.0070.06314.63
5.3.230.0070.06314.52
5.3.220.0000.07314.51
5.3.210.0030.07714.48
5.3.200.0000.06714.59
5.3.190.0030.07714.45
5.3.180.0030.06314.51
5.3.170.0030.07714.52
5.3.160.0030.07314.60
5.3.150.0030.05314.47
5.3.140.0030.05014.48
5.3.130.0030.07314.50
5.3.120.0100.07314.39
5.3.110.0000.07314.59
5.3.100.0170.03014.05
5.3.90.0000.04714.13
5.3.80.0000.07313.88
5.3.70.0030.05713.96
5.3.60.0070.06313.87
5.3.50.0000.05713.97
5.3.40.0070.07013.89
5.3.30.0100.06714.02
5.3.20.0030.06013.73
5.3.10.0000.06713.53
5.3.00.0100.06713.75
5.2.170.0000.05311.41
5.2.160.0030.05711.41
5.2.150.0030.06311.41
5.2.140.0070.05711.41
5.2.130.0030.03311.41
5.2.120.0030.06011.41
5.2.110.0070.03711.41
5.2.100.0000.06311.41
5.2.90.0030.03311.41
5.2.80.0070.05011.41
5.2.70.0030.06311.41
5.2.60.0070.05711.41
5.2.50.0030.06011.41
5.2.40.0070.04311.41
5.2.30.0000.06311.41
5.2.20.0070.03011.41
5.2.10.0030.05711.41
5.2.00.0030.05011.41
5.1.60.0000.04311.41
5.1.50.0030.05011.41
5.1.40.0070.05011.41
5.1.30.0000.05711.41
5.1.20.0000.05711.41
5.1.10.0030.04311.41
5.1.00.0100.03711.41
5.0.50.0070.04011.41
5.0.40.0000.03311.41
5.0.30.0100.05711.41
5.0.20.0000.04711.41
5.0.10.0000.04711.41
5.0.00.0030.06011.41
4.4.90.0030.02011.41
4.4.80.0030.03311.41
4.4.70.0000.03311.41
4.4.60.0000.02311.41
4.4.50.0070.03011.41
4.4.40.0000.03311.41
4.4.30.0030.03011.41
4.4.20.0000.03711.41
4.4.10.0070.01311.41
4.4.00.0000.05311.41
4.3.110.0030.03011.41
4.3.100.0030.02711.41
4.3.90.0000.03311.41
4.3.80.0000.04711.41
4.3.70.0030.03011.41
4.3.60.0000.03011.41
4.3.50.0000.02311.41
4.3.40.0070.03311.41
4.3.30.0030.03311.41
4.3.20.0030.01711.41
4.3.10.0030.03011.41
4.3.00.0000.03311.41

preferences:
47.82 ms | 401 KiB | 5 Q