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.60.0140.00718.23
8.3.50.0090.00621.19
8.3.40.0090.00618.96
8.3.30.0170.00019.21
8.3.20.0040.00420.09
8.3.10.0070.00023.66
8.3.00.0030.00619.38
8.2.180.0070.01316.63
8.2.170.0100.01022.96
8.2.160.0090.00520.57
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0000.00821.94
8.2.110.0030.00722.08
8.2.100.0070.00420.52
8.2.90.0060.00319.20
8.2.80.0050.00317.97
8.2.70.0030.00517.88
8.2.60.0000.00917.92
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0070.00418.23
8.2.20.0040.00417.95
8.2.10.0050.00318.21
8.2.00.0000.01017.87
8.1.280.0110.00725.92
8.1.270.0060.00323.96
8.1.260.0040.00426.35
8.1.250.0110.00328.09
8.1.240.0030.00722.10
8.1.230.0110.00019.28
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0030.00617.47
8.1.190.0030.00517.35
8.1.180.0000.01218.10
8.1.170.0080.00018.67
8.1.160.0040.00421.99
8.1.150.0040.00418.94
8.1.140.0060.00317.66
8.1.130.0030.00617.98
8.1.120.0000.00717.52
8.1.110.0040.00417.63
8.1.100.0000.00717.50
8.1.90.0080.00017.67
8.1.80.0040.00417.62
8.1.70.0050.00317.55
8.1.60.0000.00817.68
8.1.50.0080.00017.58
8.1.40.0040.00417.64
8.1.30.0000.00817.75
8.1.20.0030.00517.71
8.1.10.0050.00317.67
8.1.00.0070.00017.68
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0070.00018.41
8.0.270.0050.00317.34
8.0.260.0030.00317.36
8.0.250.0000.00717.19
8.0.240.0000.00717.17
8.0.230.0030.00317.18
8.0.220.0000.00717.05
8.0.210.0020.00517.10
8.0.200.0030.00317.16
8.0.190.0000.00717.16
8.0.180.0040.00417.14
8.0.170.0080.00017.13
8.0.160.0070.00017.08
8.0.150.0080.00017.08
8.0.140.0000.00817.10
8.0.130.0000.00613.54
8.0.120.0050.00317.07
8.0.110.0020.00517.09
8.0.100.0080.00017.11
8.0.90.0040.00417.22
8.0.80.0040.01117.08
8.0.70.0060.00317.09
8.0.60.0040.00417.10
8.0.50.0000.00716.92
8.0.30.0090.01217.36
8.0.20.0120.00817.40
8.0.10.0040.00417.19
8.0.00.0070.01216.88
7.4.330.0030.00315.00
7.4.320.0070.00016.49
7.4.300.0060.00016.71
7.4.290.0030.00316.52
7.4.280.0090.00016.52
7.4.270.0080.00016.67
7.4.260.0040.00416.58
7.4.250.0040.00416.48
7.4.240.0030.00516.53
7.4.230.0000.00716.67
7.4.220.0070.01416.56
7.4.210.0090.00616.78
7.4.200.0030.00516.79
7.4.160.0080.00816.66
7.4.150.0130.00317.40
7.4.140.0160.00317.86
7.4.130.0120.00616.64
7.4.120.0040.02016.67
7.4.110.0110.01116.58
7.4.100.0090.00916.77
7.4.90.0110.00816.68
7.4.80.0110.00719.39
7.4.70.0110.00716.55
7.4.60.0100.00616.83
7.4.50.0040.00416.51
7.4.40.0140.00416.53
7.4.30.0060.01316.46
7.4.00.0080.00615.11
7.3.330.0000.00513.11
7.3.320.0050.00013.27
7.3.310.0070.00016.21
7.3.300.0000.00616.39
7.3.290.0130.00316.33
7.3.280.0090.00916.32
7.3.270.0110.00917.40
7.3.260.0150.01216.61
7.3.250.0070.01216.69
7.3.240.0090.00916.70
7.3.230.0090.00916.65
7.3.210.0060.01316.70
7.3.200.0130.01319.39
7.3.190.0130.00916.40
7.3.180.0110.00516.65
7.3.170.0060.00916.48
7.3.160.0060.01216.57
7.2.330.0120.00916.68
7.2.320.0070.01316.66
7.2.310.0070.01116.80
7.2.300.0090.00916.66
7.2.290.0090.00816.61
7.2.00.0030.00619.12
7.1.100.0050.00518.45
7.1.70.0120.00317.25
7.1.60.0060.01919.32
7.1.50.0110.01117.08
7.1.00.0000.07722.35
7.0.200.0000.00716.63
7.0.140.0030.07322.18
7.0.100.0100.07719.96
7.0.90.0270.03319.96
7.0.80.0230.04019.98
7.0.70.0100.06020.05
7.0.60.0170.04019.91
7.0.50.0070.06720.28
7.0.40.0000.05319.95
7.0.30.0000.04720.08
7.0.20.0000.04720.15
7.0.10.0070.04020.11
7.0.00.0130.07720.10
5.6.280.0000.07721.08
5.6.250.0100.06020.63
5.6.240.0170.07720.61
5.6.230.0030.04720.54
5.6.220.0070.03320.64
5.6.210.0070.04720.52
5.6.200.0030.08021.18
5.6.190.0000.09020.95
5.6.180.0070.04721.04
5.6.170.0070.08021.05
5.6.160.0030.06721.11
5.6.150.0100.07721.14
5.6.140.0030.06021.02
5.6.130.0130.07021.14
5.6.120.0030.04321.05
5.6.110.0070.04321.11
5.6.100.0070.04321.04
5.6.90.0100.03721.00
5.6.80.0030.04020.48
5.6.70.0030.04020.44
5.6.60.0100.03320.46
5.6.50.0030.04720.34
5.6.40.0170.06720.41
5.6.30.0100.03720.45
5.6.20.0070.05020.35
5.6.10.0130.07320.45
5.6.00.0100.04320.29
5.5.380.0070.07020.42
5.5.370.0070.04320.50
5.5.360.0030.05020.35
5.5.350.0000.04320.36
5.5.340.0170.06720.89
5.5.330.0000.09020.84
5.5.320.0100.04720.65
5.5.310.0000.04320.77
5.5.300.0070.05320.78
5.5.290.0070.04020.93
5.5.280.0130.04320.79
5.5.270.0030.04320.88
5.5.260.0130.03720.93
5.5.250.0100.03320.74
5.5.240.0100.03320.18
5.5.230.0030.04320.25
5.5.220.0070.03720.30
5.5.210.0100.04020.22
5.5.200.0100.06020.23
5.5.190.0070.08020.29
5.5.180.0130.04020.09
5.5.160.0000.04320.16
5.5.150.0070.06020.21
5.5.140.0130.07020.16
5.5.130.0100.08020.14
5.5.120.0030.08320.28
5.5.110.0100.06720.20
5.5.100.0070.08020.14
5.5.90.0170.06720.16
5.5.80.0030.04720.13
5.5.70.0170.07020.05
5.5.60.0070.06719.98
5.5.50.0030.05720.06
5.5.40.0100.07020.06
5.5.30.0070.05020.00
5.5.20.0130.07720.04
5.5.10.0100.08020.03
5.5.00.0100.07320.08
5.4.450.0030.04319.39
5.4.440.0030.04719.39
5.4.430.0070.05719.37
5.4.420.0000.04319.34
5.4.410.0030.04019.24
5.4.400.0070.04018.96
5.4.390.0100.03019.14
5.4.380.0100.03319.09
5.4.370.0030.04318.97
5.4.360.0030.06018.81
5.4.350.0030.08019.03
5.4.340.0100.07318.79
5.4.320.0070.08318.98
5.4.310.0070.05719.07
5.4.300.0100.07719.03
5.4.290.0070.06318.78
5.4.280.0100.06718.96
5.4.270.0170.05319.07
5.4.260.0000.05018.89
5.4.250.0100.07019.11
5.4.240.0130.07018.89
5.4.230.0070.07319.11
5.4.220.0070.07719.11
5.4.210.0100.07319.11
5.4.200.0030.04719.11
5.4.190.0100.07318.93
5.4.180.0030.08018.93
5.4.170.0130.07319.03
5.4.160.0030.04318.87
5.4.150.0170.06718.94
5.4.140.0100.05016.07
5.4.130.0070.06716.27
5.4.120.0100.06716.32
5.4.110.0070.07316.31
5.4.100.0130.07016.39
5.4.90.0070.03316.33
5.4.80.0170.07316.47
5.4.70.0070.05316.36
5.4.60.0070.04716.38
5.4.50.0070.05316.20
5.4.40.0070.04016.46
5.4.30.0000.08316.20
5.4.20.0030.04016.20
5.4.10.0030.06716.18
5.4.00.0130.06715.74
5.3.290.0000.08714.66
5.3.280.0100.05714.60
5.3.270.0100.07714.53
5.3.260.0070.08714.60
5.3.250.0130.06714.58
5.3.240.0100.06014.63
5.3.230.0130.06014.55
5.3.220.0100.07014.53
5.3.210.0070.06314.56
5.3.200.0100.06714.57
5.3.190.0100.08014.44
5.3.180.0100.07314.55
5.3.170.0130.06314.57
5.3.160.0100.07314.53
5.3.150.0030.05314.44
5.3.140.0030.07314.55
5.3.130.0030.08314.52
5.3.120.0030.06314.56
5.3.110.0100.06314.55
5.3.100.0130.06713.91
5.3.90.0130.06713.95
5.3.80.0030.08313.98
5.3.70.0100.06713.89
5.3.60.0030.07014.00
5.3.50.0030.07013.73
5.3.40.0070.06013.92
5.3.30.0000.05013.78
5.3.20.0030.07013.65
5.3.10.0130.06713.66
5.3.00.0070.07313.51
5.2.170.0100.06311.26
5.2.160.0000.06711.26
5.2.150.0070.06011.26
5.2.140.0100.06011.26
5.2.130.0100.06011.26
5.2.120.0030.06311.26
5.2.110.0130.05711.26
5.2.100.0070.06011.26
5.2.90.0070.06011.26
5.2.80.0130.05711.26
5.2.70.0070.03711.26
5.2.60.0070.05311.26
5.2.50.0130.05011.26
5.2.40.0100.05711.26
5.2.30.0030.03711.26
5.2.20.0030.06311.26
5.2.10.0000.04011.26
5.2.00.0030.03311.26
5.1.60.0100.02311.26
5.1.50.0030.02711.26
5.1.40.0000.02711.26
5.1.30.0000.05711.26
5.1.20.0070.05311.26
5.1.10.0000.06011.26
5.1.00.0070.04711.26
5.0.50.0070.04311.26
5.0.40.0130.03711.26
5.0.30.0030.06711.26
5.0.20.0130.03311.26
5.0.10.0030.02311.26
5.0.00.0030.07011.26
4.4.90.0070.03011.26
4.4.80.0070.01711.26
4.4.70.0000.04011.26
4.4.60.0000.02711.26
4.4.50.0070.02711.26
4.4.40.0000.03311.26
4.4.30.0000.02311.26
4.4.20.0000.03711.26
4.4.10.0030.04011.26
4.4.00.0030.03711.26
4.3.110.0030.02711.26
4.3.100.0000.03011.26
4.3.90.0000.03711.26
4.3.80.0030.05311.26
4.3.70.0000.03011.26
4.3.60.0100.03011.26
4.3.50.0000.03311.26
4.3.40.0000.02711.26
4.3.30.0000.01711.26
4.3.20.0000.03711.26
4.3.10.0030.03711.26
4.3.00.0000.03311.26

preferences:
48.32 ms | 401 KiB | 5 Q