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 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.70.0110.00416.63
8.3.60.0070.01418.54
8.3.50.0120.01022.13
8.3.40.0070.00719.10
8.3.30.0100.00319.13
8.3.20.0000.00720.16
8.3.10.0000.00823.58
8.3.00.0080.00019.50
8.2.180.0120.00816.46
8.2.170.0130.01022.96
8.2.160.0100.00719.18
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00322.06
8.2.110.0070.00320.97
8.2.100.0040.00817.97
8.2.90.0030.00518.09
8.2.80.0030.00517.97
8.2.70.0040.00418.16
8.2.60.0080.00018.34
8.2.50.0040.00418.10
8.2.40.0000.00719.54
8.2.30.0080.00019.40
8.2.20.0060.00617.96
8.2.10.0040.00418.14
8.2.00.0070.00417.99
8.1.280.0220.00025.92
8.1.270.0040.00423.83
8.1.260.0050.00326.35
8.1.250.0110.00428.09
8.1.240.0090.00022.01
8.1.230.0000.01122.81
8.1.220.0040.00417.79
8.1.210.0050.00319.02
8.1.200.0070.00317.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0030.00618.57
8.1.160.0050.00219.12
8.1.150.0000.00718.84
8.1.140.0030.00518.89
8.1.130.0080.00017.93
8.1.120.0030.00517.64
8.1.110.0040.00417.52
8.1.100.0000.00717.61
8.1.90.0000.00717.63
8.1.80.0050.00217.52
8.1.70.0030.00417.53
8.1.60.0060.00317.72
8.1.50.0040.00417.59
8.1.40.0040.00417.51
8.1.30.0000.00917.63
8.1.20.0050.00317.59
8.1.10.0040.00417.62
8.1.00.0040.00417.66
8.0.300.0070.00021.89
8.0.290.0040.00416.88
8.0.280.0030.00318.46
8.0.270.0050.00518.28
8.0.260.0060.00017.35
8.0.250.0030.00517.17
8.0.240.0030.00317.11
8.0.230.0070.00017.15
8.0.220.0050.00317.10
8.0.210.0030.00317.14
8.0.200.0080.00017.15
8.0.190.0000.00817.17
8.0.180.0000.00717.19
8.0.170.0030.00517.13
8.0.160.0000.00817.18
8.0.150.0000.00716.96
8.0.140.0070.00017.07
8.0.130.0000.00513.55
8.0.120.0040.00417.10
8.0.110.0000.00716.94
8.0.100.0070.00016.98
8.0.90.0040.00417.06
8.0.80.0130.01117.10
8.0.70.0040.00417.11
8.0.60.0040.00417.11
8.0.50.0040.00416.99
8.0.30.0150.00617.19
8.0.20.0150.00617.40
8.0.10.0000.00717.23
8.0.00.0090.01016.79
7.4.330.0050.00015.00
7.4.320.0030.00316.70
7.4.300.0060.00016.62
7.4.290.0070.00016.64
7.4.280.0000.00816.73
7.4.270.0030.00316.61
7.4.260.0040.00416.48
7.4.250.0050.00316.57
7.4.240.0020.00616.65
7.4.230.0070.00016.45
7.4.220.0120.01316.80
7.4.210.0060.01016.54
7.4.200.0080.00016.62
7.4.160.0120.00616.59
7.4.150.0100.01017.40
7.4.140.0110.01117.86
7.4.130.0130.00516.72
7.4.120.0090.00916.64
7.4.110.0160.00916.76
7.4.100.0030.01416.59
7.4.90.0090.00916.79
7.4.80.0130.01019.39
7.4.70.0080.01316.69
7.4.60.0100.00716.63
7.4.50.0060.00316.63
7.4.40.0040.01316.50
7.4.30.0140.00416.89
7.4.00.0070.00914.99
7.3.330.0060.00013.33
7.3.320.0000.00513.23
7.3.310.0040.00416.38
7.3.300.0030.00316.38
7.3.290.0110.00816.31
7.3.280.0090.00716.36
7.3.270.0100.01017.40
7.3.260.0110.00816.60
7.3.250.0120.00516.41
7.3.240.0110.00816.54
7.3.230.0150.00616.49
7.3.210.0130.00316.50
7.3.200.0120.00619.39
7.3.190.0110.01216.54
7.3.180.0040.01716.44
7.3.170.0030.01316.71
7.3.160.0070.01616.63
7.3.120.0030.01315.28
7.3.110.0070.01015.06
7.3.100.0110.00314.88
7.3.90.0060.00614.95
7.3.80.0040.00814.90
7.3.70.0090.00614.81
7.3.60.0070.00714.81
7.3.50.0030.01415.13
7.3.40.0100.00514.87
7.3.30.0070.00314.85
7.3.20.0040.01116.83
7.3.10.0260.00816.48
7.3.00.0020.01316.54
7.2.330.0090.00916.82
7.2.320.0160.00916.49
7.2.310.0070.01116.66
7.2.300.0130.00316.60
7.2.290.0100.00716.92
7.2.250.0070.01115.09
7.2.240.0040.01115.02
7.2.230.0100.00715.50
7.2.220.0100.00315.13
7.2.210.0040.01115.07
7.2.200.0040.01115.13
7.2.190.0040.01115.28
7.2.180.0060.00915.29
7.2.170.0120.00415.35
7.2.130.0100.00316.71
7.2.120.0090.00916.72
7.2.110.0000.01416.89
7.2.100.0070.01016.44
7.2.90.0030.01316.53
7.2.80.0030.00816.92
7.2.70.0030.01216.83
7.2.60.0000.01116.66
7.2.50.0130.00316.78
7.2.40.0040.01116.71
7.2.30.0090.00616.70
7.2.20.0040.00816.91
7.2.10.0070.00316.98
7.2.00.0050.00817.93
7.1.330.0060.00616.00
7.1.320.0030.00915.63
7.1.310.0060.01316.00
7.1.300.0070.00715.68
7.1.290.0040.01415.88
7.1.280.0110.00015.95
7.1.270.0040.01115.64
7.1.260.0240.00715.66
7.1.250.0000.01615.81
7.1.100.0060.00618.27
7.1.70.0040.00417.25
7.1.60.0070.01719.32
7.1.50.0000.02217.11
7.1.00.0070.07322.30
7.0.200.0040.01116.97
7.0.140.0100.06322.09
7.0.100.0030.07719.95
7.0.90.0100.08319.90
7.0.80.0300.05319.93
7.0.70.0430.04319.86
7.0.60.0430.07719.98
7.0.50.0470.08020.37
7.0.40.0100.07020.18
7.0.30.0100.05320.11
7.0.20.0030.03720.18
7.0.10.0100.07320.13
7.0.00.0070.08320.07
5.6.250.0070.05020.70
5.6.240.0000.05320.52
5.6.230.0030.06320.50
5.6.220.0170.06020.67
5.6.210.0100.04320.75
5.6.200.0130.08021.09
5.6.190.0030.08020.96
5.6.180.0030.08020.95
5.6.170.0300.06321.05
5.6.160.0030.08321.06
5.6.150.0100.06721.07
5.6.140.0070.04721.08
5.6.130.0030.08320.95
5.6.120.0100.09021.01
5.6.110.0170.07321.00
5.6.100.0030.09021.05
5.6.90.0170.07720.92
5.6.80.0130.04720.47
5.6.70.0100.08020.46
5.6.60.0030.07020.48
5.6.50.0000.04320.44
5.6.40.0070.03720.42
5.6.30.0030.04320.54
5.6.20.0000.04320.41
5.6.10.0130.03020.49
5.6.00.0030.04020.44
5.5.380.0070.08020.32
5.5.370.0130.08020.32
5.5.360.0030.08720.35
5.5.350.0170.07320.40
5.5.340.0130.07720.85
5.5.330.0070.08320.94
5.5.320.0070.06720.88
5.5.310.0000.05020.74
5.5.300.0130.07320.80
5.5.290.0070.08020.88
5.5.280.0130.07320.81
5.5.270.0100.08320.64
5.5.260.0070.08320.76
5.5.250.0030.05020.70
5.5.240.0100.07720.26
5.5.230.0130.07020.30
5.5.220.0070.03720.11
5.5.210.0030.04020.11
5.5.200.0070.04320.21
5.5.190.0100.03320.22
5.5.180.0030.04020.24
5.5.160.0070.03720.25
5.5.150.0100.06720.13
5.5.140.0030.03320.24
5.5.130.0000.07020.18
5.5.120.0000.04720.27
5.5.110.0070.05720.18
5.5.100.0100.06320.17
5.5.90.0070.03020.06
5.5.80.0070.04320.13
5.5.70.0070.03720.11
5.5.60.0100.03720.16
5.5.50.0070.03020.17
5.5.40.0070.03320.00
5.5.30.0000.04319.95
5.5.20.0100.03320.08
5.5.10.0030.04020.13
5.5.00.0000.04720.07
5.4.450.0100.03719.14
5.4.440.0100.06719.48
5.4.430.0070.05719.27
5.4.420.0200.08019.22
5.4.410.0100.06719.01
5.4.400.0030.06718.90
5.4.390.0030.05018.98
5.4.380.0100.04019.07
5.4.370.0070.04019.12
5.4.360.0130.03019.07
5.4.350.0000.06018.97
5.4.340.0000.04019.09
5.4.320.0000.04019.03
5.4.310.0030.05719.03
5.4.300.0100.03719.08
5.4.290.0030.03319.11
5.4.280.0070.04018.90
5.4.270.0070.03719.03
5.4.260.0130.02719.12
5.4.250.0030.03319.02
5.4.240.0030.03718.77
5.4.230.0030.03719.02
5.4.220.0030.03319.13
5.4.210.0070.05319.02
5.4.200.0000.04019.13
5.4.190.0100.03019.04
5.4.180.0030.03319.08
5.4.170.0000.04019.08
5.4.160.0030.04019.12
5.4.150.0070.03719.10
5.4.140.0000.03716.18
5.4.130.0000.03716.38
5.4.120.0070.03316.31
5.4.110.0100.02716.36
5.4.100.0070.03316.26
5.4.90.0000.04016.27
5.4.80.0000.03716.24
5.4.70.0030.03716.25
5.4.60.0100.03016.24
5.4.50.0030.03316.23
5.4.40.0070.03016.43
5.4.30.0000.04316.27
5.4.20.0070.07316.20
5.4.10.0000.03716.32
5.4.00.0100.06715.73
5.3.290.0070.03714.62
5.3.280.0000.04314.47
5.3.270.0000.03714.46
5.3.260.0030.04014.61
5.3.250.0000.04014.54
5.3.240.0070.03314.62
5.3.230.0030.04014.59
5.3.220.0070.03714.54
5.3.210.0030.04314.42
5.3.200.0000.04014.54
5.3.190.0000.04014.53
5.3.180.0030.03714.59
5.3.170.0030.03714.58
5.3.160.0030.04314.56
5.3.150.0030.03314.57
5.3.140.0070.03714.52
5.3.130.0100.03314.47
5.3.120.0170.03314.38
5.3.110.0100.06714.52
5.3.100.0000.08014.04
5.3.90.0070.04314.00
5.3.80.0070.07013.81
5.3.70.0100.03714.02
5.3.60.0000.08313.98
5.3.50.0130.07013.72
5.3.40.0070.07313.87
5.3.30.0070.03313.92
5.3.20.0100.06713.46
5.3.10.0030.07013.58
5.3.00.0200.04013.59
5.2.170.0070.05312.69
5.2.160.0000.03312.69
5.2.150.0030.03712.69
5.2.140.0070.06012.69
5.2.130.0030.03012.69
5.2.120.0030.04012.69
5.2.110.0030.05712.69
5.2.100.0030.03312.69
5.2.90.0100.05712.69
5.2.80.0070.06312.69
5.2.70.0070.06012.69
5.2.60.0070.05712.69
5.2.50.0000.06712.69
5.2.40.0130.05312.69
5.2.30.0100.06012.69
5.2.20.0100.04012.69
5.2.10.0070.02712.69
5.2.00.0100.05012.69
5.1.60.0100.03012.69
5.1.50.0030.06012.69
5.1.40.0070.05012.69
5.1.30.0030.06012.69
5.1.20.0070.05312.69
5.1.10.0000.06012.69
5.1.00.0070.04312.69
5.0.50.0070.04012.69
5.0.40.0070.02012.69
5.0.30.0130.05312.69
5.0.20.0030.04312.69
5.0.10.0000.04712.69
5.0.00.0070.06312.69
4.4.90.0030.03312.69
4.4.80.0030.03712.69
4.4.70.0070.03012.69
4.4.60.0030.03712.69
4.4.50.0000.03312.69
4.4.40.0000.05312.69
4.4.30.0000.02012.69
4.4.20.0100.02712.69
4.4.10.0070.02712.69
4.4.00.0030.03012.69
4.3.110.0030.03312.69
4.3.100.0030.03312.69
4.3.90.0030.02712.69
4.3.80.0030.04712.69
4.3.70.0030.03012.69
4.3.60.0030.03312.69
4.3.50.0070.03012.69
4.3.40.0000.05312.69
4.3.30.0000.03712.69
4.3.20.0000.03312.69
4.3.10.0030.02712.69
4.3.00.0030.03312.69

preferences:
50.85 ms | 401 KiB | 5 Q