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> <?php echo $elements_in_calendar ?> <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.60.0100.01018.55
8.3.50.0120.01122.17
8.3.40.0040.01119.01
8.3.30.0100.00319.23
8.3.20.0040.00420.29
8.3.10.0080.00023.66
8.3.00.0060.00319.50
8.2.180.0110.01117.00
8.2.170.0000.01522.96
8.2.160.0110.00419.36
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00422.31
8.2.110.0030.00620.50
8.2.100.0040.00818.16
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0080.00017.84
8.2.60.0100.00017.80
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0030.00518.25
8.2.20.0060.00318.01
8.2.10.0080.00018.08
8.2.00.0000.01118.00
8.1.280.0150.00425.92
8.1.270.0040.00423.91
8.1.260.0000.00826.35
8.1.250.0090.00628.09
8.1.240.0000.00923.71
8.1.230.0070.00420.99
8.1.220.0030.00618.79
8.1.210.0060.00318.77
8.1.200.0030.00717.36
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0060.00318.63
8.1.160.0000.00722.09
8.1.150.0000.00818.90
8.1.140.0040.00417.56
8.1.130.0030.00617.96
8.1.120.0000.00717.61
8.1.110.0050.00317.50
8.1.100.0030.00317.62
8.1.90.0000.00717.50
8.1.80.0000.00717.52
8.1.70.0040.00417.48
8.1.60.0060.00317.73
8.1.50.0080.00017.64
8.1.40.0030.00617.58
8.1.30.0000.00817.77
8.1.20.0000.00817.70
8.1.10.0040.00417.63
8.1.00.0080.00017.52
8.0.300.0030.00618.77
8.0.290.0030.00616.88
8.0.280.0030.00318.42
8.0.270.0040.00416.95
8.0.260.0030.00317.28
8.0.250.0070.00017.09
8.0.240.0030.00317.15
8.0.230.0040.00417.15
8.0.220.0000.00717.08
8.0.210.0000.00717.01
8.0.200.0050.00317.18
8.0.190.0080.00017.24
8.0.180.0000.00817.15
8.0.170.0000.00817.14
8.0.160.0000.00717.16
8.0.150.0000.00916.95
8.0.140.0030.00517.13
8.0.130.0000.00713.48
8.0.120.0070.00017.16
8.0.110.0040.00417.02
8.0.100.0040.00417.04
8.0.90.0000.00717.18
8.0.80.0120.01217.14
8.0.70.0050.00216.99
8.0.60.0000.00817.13
8.0.50.0030.00517.22
8.0.30.0130.00717.29
8.0.20.0160.00617.40
8.0.10.0040.00417.28
8.0.00.0150.00916.98
7.4.330.0050.00015.00
7.4.320.0030.00316.46
7.4.300.0030.00316.55
7.4.290.0030.00316.64
7.4.280.0000.00916.59
7.4.270.0000.00716.66
7.4.260.0040.00416.49
7.4.250.0020.00516.52
7.4.240.0050.00216.61
7.4.230.0000.00716.60
7.4.220.0060.00616.49
7.4.210.0090.00516.63
7.4.200.0040.00416.80
7.4.160.0050.01116.71
7.4.150.0040.01617.40
7.4.140.0110.01217.86
7.4.130.0090.01216.73
7.4.120.0110.00716.54
7.4.110.0070.01116.82
7.4.100.0100.01416.74
7.4.90.0110.00616.69
7.4.80.0080.01119.39
7.4.70.0170.00016.62
7.4.60.0170.00016.80
7.4.50.0000.00516.46
7.4.40.0120.00616.75
7.4.30.0060.01216.96
7.4.00.0110.00615.22
7.3.330.0030.00313.26
7.3.320.0030.00313.33
7.3.310.0030.00316.23
7.3.300.0070.00016.41
7.3.290.0150.00516.42
7.3.280.0080.00916.46
7.3.270.0100.01017.40
7.3.260.0070.01116.64
7.3.240.0030.01516.43
7.3.230.0040.01616.66
7.3.210.0110.00816.68
7.3.200.0080.01419.39
7.3.190.0090.01216.66
7.3.180.0090.01416.81
7.3.170.0080.00816.82
7.3.160.0150.00616.43
7.3.120.0070.01015.08
7.3.110.0060.01215.07
7.3.100.0040.01115.08
7.3.90.0060.00915.06
7.3.80.0070.00715.06
7.3.70.0100.00715.08
7.3.60.0060.00915.04
7.3.50.0030.01015.05
7.3.40.0060.00914.93
7.3.30.0000.01015.03
7.3.20.0070.01016.95
7.3.10.0100.00716.80
7.3.00.0000.01616.68
7.2.330.0060.01316.70
7.2.320.0070.01717.00
7.2.310.0090.00916.54
7.2.300.0130.00716.87
7.2.290.0030.01316.54
7.2.250.0060.01215.23
7.2.240.0130.00715.56
7.2.230.0090.00915.02
7.2.220.0130.00315.53
7.2.210.0090.00615.07
7.2.200.0070.01015.20
7.2.190.0060.00615.13
7.2.180.0090.00614.92
7.2.170.0070.00715.09
7.2.60.0100.00317.16
7.2.00.0000.01619.41
7.1.330.0070.01015.77
7.1.320.0030.01015.88
7.1.310.0140.00316.18
7.1.300.0030.00916.03
7.1.290.0070.00716.00
7.1.280.0030.01215.79
7.1.270.0030.01015.76
7.1.260.0110.00416.06
7.1.200.0030.00616.02
7.1.100.0060.00618.38
7.1.70.0050.00217.21
7.1.60.0100.01619.32
7.1.50.0070.01316.75
7.1.00.0030.07722.54
7.0.200.0100.00016.89
7.0.140.0030.07322.04
7.0.110.0600.08720.04
7.0.100.0500.04719.94
7.0.90.0630.08020.01
7.0.80.0630.08020.02
7.0.70.0470.08319.87
7.0.60.0700.07720.00
7.0.50.0700.07319.91
7.0.40.0070.08019.70
7.0.30.0030.09719.79
7.0.20.0100.08319.53
7.0.10.0000.06319.73
7.0.00.0070.06319.73
5.6.280.0070.06320.93
5.6.260.0100.06720.47
5.6.250.0030.07720.61
5.6.240.0000.05720.51
5.6.230.0030.08020.66
5.6.220.0100.08020.63
5.6.210.0030.06320.69
5.6.200.0100.07020.64
5.6.190.0000.08320.67
5.6.180.0030.04720.55
5.6.170.0000.05020.51
5.6.160.0070.08020.63
5.6.150.0100.06020.63
5.6.140.0070.07720.65
5.6.130.0070.07320.61
5.6.120.0000.08020.57
5.6.110.0070.08320.50
5.6.100.0130.06320.50
5.6.90.0000.06020.49
5.6.80.0070.06019.99
5.6.70.0100.07720.02
5.6.60.0000.05319.98
5.6.50.0100.07720.16
5.6.40.0070.08019.90
5.6.30.0030.08020.01
5.6.20.0130.07319.87
5.6.10.0070.08019.96
5.6.00.0070.07319.92
5.5.380.0000.08317.63
5.5.370.0000.08317.59
5.5.360.0070.07317.61
5.5.350.0070.07317.49
5.5.340.0170.06018.13
5.5.330.0030.08018.13
5.5.320.0070.07718.10
5.5.310.0030.08317.86
5.5.300.0030.08318.25
5.5.290.0030.08717.99
5.5.280.0100.07717.84
5.5.270.0070.08318.00
5.5.260.0070.07718.09
5.5.250.0070.08317.93
5.5.240.0100.06317.27
5.5.230.0030.07317.22
5.5.220.0100.07017.21
5.5.210.0030.08017.50
5.5.200.0070.06717.21
5.5.190.0100.05717.33
5.5.180.0030.08017.38
5.5.160.0030.07717.21
5.5.150.0130.06717.56
5.5.140.0170.06717.21
5.5.130.0130.06317.37
5.5.120.0070.07317.25
5.5.110.0070.08017.50
5.5.100.0030.05317.12
5.5.90.0130.06717.09
5.5.80.0070.07717.38
5.5.70.0070.07717.34
5.5.60.0030.05717.27
5.5.50.0030.07717.10
5.5.40.0070.07017.13
5.5.30.0030.08017.10
5.5.20.0100.07717.40
5.5.10.0070.05017.13
5.5.00.0030.07317.09
5.4.450.0070.05319.23
5.4.440.0030.06019.39
5.4.430.0100.08019.52
5.4.420.0100.08319.29
5.4.410.0030.05019.26
5.4.400.0030.07019.11
5.4.390.0070.04319.11
5.4.380.0070.04318.88
5.4.370.0070.07719.13
5.4.360.0030.07718.95
5.4.350.0070.07718.96
5.4.340.0170.04019.07
5.4.320.0170.07319.12
5.4.310.0100.07319.13
5.4.300.0100.07719.11
5.4.290.0130.07318.90
5.4.280.0030.08318.93
5.4.270.0070.04719.06
5.4.260.0070.08018.98
5.4.250.0130.06719.06
5.4.240.0100.05318.90
5.4.230.0070.07318.95
5.4.220.0070.07719.11
5.4.210.0070.07319.05
5.4.200.0130.06318.96
5.4.190.0100.07019.06
5.4.180.0030.05719.19
5.4.170.0100.04319.07
5.4.160.0070.07318.95
5.4.150.0070.08018.95
5.4.140.0070.07316.45
5.4.130.0030.07716.39
5.4.120.0070.07316.47
5.4.110.0070.07016.50
5.4.100.0030.05316.36
5.4.90.0030.04716.38
5.4.80.0030.06316.52
5.4.70.0000.07716.36
5.4.60.0030.07716.12
5.4.50.0130.06016.22
5.4.40.0030.07716.50
5.4.30.0130.06716.30
5.4.20.0070.07016.31
5.4.10.0030.07316.39
5.4.00.0100.07015.66
5.3.290.0000.05014.55
5.3.280.0000.06014.55
5.3.270.0100.07714.69
5.3.260.0030.08014.41
5.3.250.0070.06714.45
5.3.240.0100.07014.55
5.3.230.0070.08314.63
5.3.220.0070.05014.61
5.3.210.0070.07714.58
5.3.200.0070.07314.45
5.3.190.0170.06314.37
5.3.180.0000.07314.61
5.3.170.0030.06314.43
5.3.160.0100.07014.52
5.3.150.0100.04314.46
5.3.140.0030.04014.64
5.3.130.0070.07014.46
5.3.120.0130.06714.46
5.3.110.0100.03014.38
5.3.100.0070.07014.12
5.3.90.0000.07713.91
5.3.80.0100.07314.11
5.3.70.0000.04713.86
5.3.60.0130.06013.95
5.3.50.0100.03713.85
5.3.40.0100.06313.84
5.3.30.0070.07713.82
5.3.20.0070.07013.64
5.3.10.0030.07013.71
5.3.00.0030.06313.58
5.2.170.0070.04011.16
5.2.160.0030.05311.18
5.2.150.0100.06011.32
5.2.140.0030.06011.16
5.2.130.0070.05011.01
5.2.120.0030.06011.05
5.2.110.0100.05711.05
5.2.100.0070.03311.13
5.2.90.0030.06011.01
5.2.80.0000.06711.17
5.2.70.0030.06310.90
5.2.60.0030.05311.07
5.2.50.0070.05710.96
5.2.40.0000.06310.96
5.2.30.0070.06311.00
5.2.20.0030.06310.89
5.2.10.0030.05310.94
5.2.00.0070.04710.71
5.1.60.0030.0479.97
5.1.50.0070.0479.99
5.1.40.0030.0539.96
5.1.30.0070.03310.32
5.1.20.0000.03310.22
5.1.10.0100.04310.33
5.1.00.0070.05310.14
5.0.50.0030.0478.81
5.0.40.0000.0408.41
5.0.30.0030.0438.32
5.0.20.0030.0408.19
5.0.10.0000.0278.19
5.0.00.0030.0638.24
4.4.90.0030.0307.01
4.4.80.0070.0337.01
4.4.70.0030.0337.01
4.4.60.0000.0177.01
4.4.50.0100.0277.01
4.4.40.0030.0477.01
4.4.30.0030.0407.01
4.4.20.0070.0337.01
4.4.10.0000.0277.01
4.4.00.0070.0537.01
4.3.110.0100.0277.01
4.3.100.0070.0307.01
4.3.90.0070.0137.01
4.3.80.0000.0277.01
4.3.70.0070.0307.01
4.3.60.0000.0377.01
4.3.50.0100.0237.01
4.3.40.0070.0507.01
4.3.30.0030.0377.01
4.3.20.0000.0377.01
4.3.10.0030.0307.01
4.3.00.0030.0337.01

preferences:
42.61 ms | 401 KiB | 5 Q