3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = array( "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември" ); $days_in_month = date('t'); $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; $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.40.0090.00618.79
8.3.30.0070.00719.04
8.3.20.0050.00520.19
8.3.10.0070.00023.65
8.3.00.0000.00819.63
8.2.170.0060.00922.96
8.2.160.0100.00719.17
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0020.00522.19
8.2.110.0090.00020.41
8.2.100.0070.00718.22
8.2.90.0050.00319.19
8.2.80.0030.00917.97
8.2.70.0040.00417.88
8.2.60.0030.00517.93
8.2.50.0030.00618.07
8.2.40.0050.00318.43
8.2.30.0070.00418.33
8.2.20.0060.00617.90
8.2.10.0040.00418.30
8.2.00.0030.00618.03
8.1.270.0000.00823.96
8.1.260.0050.00226.35
8.1.250.0100.00328.09
8.1.240.0090.00023.82
8.1.230.0090.00319.11
8.1.220.0000.00817.89
8.1.210.0040.00418.77
8.1.200.0100.00317.47
8.1.190.0040.00417.38
8.1.180.0060.00318.10
8.1.170.0040.00418.79
8.1.160.0080.00021.98
8.1.150.0040.00419.06
8.1.140.0040.00417.64
8.1.130.0040.00417.95
8.1.120.0050.00317.54
8.1.110.0020.00517.63
8.1.100.0000.00717.59
8.1.90.0070.00017.60
8.1.80.0040.00417.57
8.1.70.0040.00417.58
8.1.60.0060.00317.59
8.1.50.0030.00517.57
8.1.40.0040.00417.62
8.1.30.0090.00017.65
8.1.20.0030.00517.77
8.1.10.0040.00417.71
8.1.00.0030.00617.67
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0030.00318.50
8.0.270.0000.00717.28
8.0.260.0000.00717.37
8.0.250.0030.00317.17
8.0.240.0000.00717.25
8.0.230.0000.00717.08
8.0.220.0000.00717.10
8.0.210.0000.00717.02
8.0.200.0000.00717.06
8.0.190.0000.00817.19
8.0.180.0000.00717.04
8.0.170.0000.00817.14
8.0.160.0050.00217.11
8.0.150.0040.00417.11
8.0.140.0000.00716.99
8.0.130.0030.00313.59
8.0.120.0050.00217.16
8.0.110.0000.00817.09
8.0.100.0050.00217.00
8.0.90.0050.00316.98
8.0.80.0070.01017.16
8.0.70.0060.00317.16
8.0.60.0000.00717.08
8.0.50.0040.00417.01
8.0.30.0130.00717.23
8.0.20.0110.00917.46
8.0.10.0050.00217.31
8.0.00.0150.00817.05
7.4.330.0000.00515.00
7.4.320.0000.00616.54
7.4.300.0000.00716.70
7.4.290.0030.00316.63
7.4.280.0070.00016.61
7.4.270.0030.00316.59
7.4.260.0000.00716.66
7.4.250.0080.00016.54
7.4.240.0000.00716.68
7.4.230.0000.00716.82
7.4.220.0100.01316.58
7.4.210.0130.01016.49
7.4.200.0000.00816.60
7.4.160.0070.01016.64
7.4.150.0130.00617.40
7.4.140.0130.00817.86
7.4.130.0120.01216.59
7.4.120.0090.01216.67
7.4.110.0160.00716.53
7.4.100.0080.01116.63
7.4.90.0040.01316.68
7.4.80.0120.01219.39
7.4.70.0100.00716.60
7.4.60.0100.00716.89
7.4.50.0030.00616.52
7.4.40.0200.00316.71
7.4.30.0090.00916.63
7.4.00.0070.01015.23
7.3.330.0070.00013.03
7.3.320.0050.00013.12
7.3.310.0070.00016.20
7.3.300.0000.00716.34
7.3.290.0120.00816.31
7.3.280.0060.00916.34
7.3.270.0080.01117.40
7.3.260.0100.00716.46
7.3.240.0100.01016.66
7.3.230.0160.00316.39
7.3.210.0120.00316.69
7.3.200.0050.01419.39
7.3.190.0130.01016.45
7.3.180.0030.01316.67
7.3.170.0030.01316.62
7.3.160.0060.01116.54
7.3.10.0120.00916.54
7.3.00.0090.00716.34
7.2.330.0040.01516.69
7.2.320.0090.01316.77
7.2.310.0100.01316.67
7.2.300.0150.00316.97
7.2.290.0110.00816.63
7.2.130.0110.01016.70
7.2.120.0130.00416.50
7.2.110.0080.00716.83
7.2.100.0090.00916.51
7.2.90.0050.01316.88
7.2.80.0090.01116.86
7.2.70.0070.00716.88
7.2.60.0100.00816.68
7.2.50.0080.00816.96
7.2.40.0110.00716.89
7.2.30.0080.00716.75
7.2.20.0120.00416.82
7.2.10.0090.00816.80
7.2.00.0080.00517.50
7.1.250.0090.00615.65
7.1.100.0090.00318.26
7.1.70.0080.00317.17
7.1.60.0080.00417.41
7.1.50.0070.01417.07
7.1.00.0000.08022.30
7.0.200.0170.00716.97
7.0.140.0030.07722.09
7.0.100.0170.04720.04
7.0.90.0230.05019.94
7.0.80.0000.04319.97
7.0.70.0170.05319.97
7.0.60.0130.04019.93
7.0.50.0130.03320.32
7.0.40.0030.03719.95
7.0.30.0070.04020.14
7.0.20.0070.04719.99
7.0.10.0030.03320.09
7.0.00.0030.03720.11
5.6.280.0000.07720.93
5.6.250.0030.06020.76
5.6.240.0030.04720.64
5.6.230.0100.07720.62
5.6.220.0070.03720.75
5.6.210.0030.04320.49
5.6.200.0100.03721.09
5.6.190.0030.03721.08
5.6.180.0130.02321.01
5.6.170.0070.03721.14
5.6.160.0030.03721.09
5.6.150.0170.02320.96
5.6.140.0070.03321.00
5.6.130.0070.03321.19
5.6.120.0000.04321.08
5.6.110.0000.04021.13
5.6.100.0130.03321.04
5.6.90.0000.04021.02
5.6.80.0000.03720.36
5.6.70.0030.03320.34
5.6.60.0030.03320.48
5.6.50.0100.02720.47
5.6.40.0030.03320.32
5.6.30.0100.02720.52
5.6.20.0000.03720.39
5.6.10.0030.03320.38
5.6.00.0030.03320.40
5.5.380.0100.03720.38
5.5.370.0100.06720.37
5.5.360.0070.04320.31
5.5.350.0100.06720.34
5.5.340.0030.03320.74
5.5.330.0030.04720.84
5.5.320.0000.04720.89
5.5.310.0070.03320.86
5.5.300.0030.03720.73
5.5.290.0030.04020.89
5.5.280.0100.03720.75
5.5.270.0070.03320.84
5.5.260.0000.03720.79
5.5.250.0030.03720.72
5.5.240.0070.03020.16
5.5.230.0070.03020.03
5.5.220.0030.03320.22
5.5.210.0070.03320.21
5.5.200.0000.03720.25
5.5.190.0030.04020.19
5.5.180.0030.04020.19
5.5.160.0070.03720.16
5.5.150.0100.05320.11
5.5.140.0000.08720.25
5.5.130.0130.05320.13
5.5.120.0130.07320.21
5.5.110.0030.05019.96
5.5.100.0030.05720.06
5.5.90.0130.04320.05
5.5.80.0070.05020.10
5.5.70.0070.04320.04
5.5.60.0030.04720.00
5.5.50.0100.06020.12
5.5.40.0030.06319.94
5.5.30.0100.06720.10
5.5.20.0030.04020.08
5.5.10.0030.03720.02
5.5.00.0070.07020.02
5.4.450.0030.04319.36
5.4.440.0000.03719.11
5.4.430.0070.03019.30
5.4.420.0030.03319.13
5.4.410.0070.03319.16
5.4.400.0070.03319.14
5.4.390.0030.03319.11
5.4.380.0070.03019.05
5.4.370.0070.02719.10
5.4.360.0100.04019.06
5.4.350.0030.03719.13
5.4.340.0030.03318.96
5.4.320.0100.03018.96
5.4.310.0030.05318.90
5.4.300.0170.05719.07
5.4.290.0000.05719.11
5.4.280.0070.07319.11
5.4.270.0070.06319.11
5.4.260.0070.06719.14
5.4.250.0100.03019.14
5.4.240.0030.05719.02
5.4.230.0030.04718.80
5.4.220.0070.08019.02
5.4.210.0070.07319.14
5.4.200.0130.02719.24
5.4.190.0070.06719.11
5.4.180.0070.07719.11
5.4.170.0030.04319.09
5.4.160.0070.05019.20
5.4.150.0000.08719.21
5.4.140.0100.07316.32
5.4.130.0100.07016.39
5.4.120.0100.06716.39
5.4.110.0070.07016.32
5.4.100.0070.05016.48
5.4.90.0100.06316.36
5.4.80.0100.06316.34
5.4.70.0100.07016.49
5.4.60.0000.05016.21
5.4.50.0030.03716.38
5.4.40.0030.05316.36
5.4.30.0100.06716.41
5.4.20.0070.03016.19
5.4.10.0030.04016.33
5.4.00.0130.06015.81
5.3.290.0030.03714.62
5.3.280.0000.04314.55
5.3.270.0030.05714.55
5.3.260.0070.08014.60
5.3.250.0030.03314.58
5.3.240.0070.07314.61
5.3.230.0130.07314.63
5.3.220.0100.03314.57
5.3.210.0130.05714.57
5.3.200.0000.06714.44
5.3.190.0000.07714.57
5.3.180.0100.06314.59
5.3.170.0070.03314.43
5.3.160.0100.06714.58
5.3.150.0070.03714.52
5.3.140.0030.07014.41
5.3.130.0100.07014.55
5.3.120.0030.08714.56
5.3.110.0030.06014.55
5.3.100.0100.07314.04
5.3.90.0100.04314.00
5.3.80.0170.05713.89
5.3.70.0100.06713.98
5.3.60.0000.05314.00
5.3.50.0170.06713.89
5.3.40.0070.03713.87
5.3.30.0130.07013.78
5.3.20.0100.05313.61
5.3.10.0070.04713.53
5.3.00.0000.04713.60
5.2.170.0070.03311.60
5.2.160.0030.05311.60
5.2.150.0030.06011.60
5.2.140.0100.05711.60
5.2.130.0000.03711.60
5.2.120.0100.02711.60
5.2.110.0030.03311.60
5.2.100.0100.02711.60
5.2.90.0100.05711.60
5.2.80.0000.06311.60
5.2.70.0070.06011.60
5.2.60.0000.03711.60
5.2.50.0000.03711.60
5.2.40.0030.04311.60
5.2.30.0070.02311.60
5.2.20.0130.04311.60
5.2.10.0030.06011.60
5.2.00.0030.02711.60
5.1.60.0000.02311.60
5.1.50.0000.05311.60
5.1.40.0030.02311.60
5.1.30.0070.02311.60
5.1.20.0000.03311.60
5.1.10.0070.04011.60
5.1.00.0100.04311.60
5.0.50.0000.02311.60
5.0.40.0030.03711.60
5.0.30.0030.04011.60
5.0.20.0100.02311.60
5.0.10.0000.02011.60
5.0.00.0070.03011.60
4.4.90.0030.01311.60
4.4.80.0000.03011.60
4.4.70.0030.01311.60
4.4.60.0070.03011.60
4.4.50.0030.02711.60
4.4.40.0100.03711.60
4.4.30.0030.01711.60
4.4.20.0000.01711.60
4.4.10.0030.01711.60
4.4.00.0030.04711.60
4.3.110.0030.03311.60
4.3.100.0070.02311.60
4.3.90.0030.02311.60
4.3.80.0000.02311.60
4.3.70.0000.01311.60
4.3.60.0030.01711.60
4.3.50.0000.01711.60
4.3.40.0030.05711.60
4.3.30.0000.03011.60
4.3.20.0030.01311.60
4.3.10.0070.03311.60
4.3.00.0070.02311.60

preferences:
49.9 ms | 400 KiB | 5 Q