3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'UTF-8'); date_default_timezone_set('America/Sao_Paulo'); $datestring = ''; $monthago = ''; $monthsago = ''; $period = new DatePeriod( new DateTime('-3 months'), DateInterval::createFromDateString('first day of next month'), new DateTime('NOW') ); $months = array(); foreach ($period as $p) $months[] = strftime('%B', $p->getTimestamp()); if(array_search("January",$months) >= 1){ $months = str_replace("January","Janeiro",$months); if ($months[3] == "Janeiro") { $datestring = '0115'; } if ($months[2] == "Janeiro") { $lastmonth = "0115"; } if ($months[1] == "Janeiro") { $monthsago = "0115"; } }elseif(array_search("February",$months) >= 1){ $months = str_replace("February","Fevereiro",$months); if ($months[3] == "Fevereiro") { $datestring = "0215"; } if ($months[2] == "Fevereiro") { $lastmonth = "0215"; } if ($months[1] == "Fevereiro") { $monthsago = "0215"; } }elseif(array_search("March",$months) >= 1){ $months = str_replace("March","Março",$months); if ($months[3] == "Março") { $datestring = "0315"; } if ($months[2] == "Março") { $lastmonth = "0315"; } if ($months[1] == "Março") { $monthsago = "0315"; } }elseif(array_search("April",$months) >= 1){ $months = str_replace("April","Abril",$months); if ($months[3] == "Abril") { $datestring = "0415"; } if ($months[2] == "Abril") { $lastmonth = "0415"; } if ($months[1] == "Abril") { $monthsago = "0415"; } }elseif(array_search("May",$months) >= 1){ $months = str_replace("May","Maio",$months); if ($months[3] == "Maio") { $datestring = "0515"; } if ($months[2] == "Maio") { $lastmonth = "0515"; } if ($months[1] == "Maio") { $monthsago = "0515"; } }elseif(array_search("June",$months) >= 1){ $months = str_replace("June","Junho",$months); if ($months[3] == "Junho") { $datestring = "0615"; } if ($months[2] == "Junho") { $lastmonth = "0615"; } if ($months[1] == "Junho") { $monthsago = "0615"; } }elseif(array_search("July",$months) >= 1){ $months = str_replace("July","Julho",$months); if ($months[3] == "Julho") { $datestring = "0715"; } if ($months[2] == "Julho") { $lastmonth = "0715"; } if ($months[1] == "Julho") { $monthsago = "0715"; } }elseif(array_search("August",$months) >= 1){ $months = str_replace("August","Agosto",$months); if ($months[3] == "Agosto") { $datestring = "0815"; } if ($months[2] == "Agosto") { $lastmonth = "0815"; } if ($months[1] == "Agosto") { $monthsago = "0815"; } }elseif(array_search("September",$months) >= 1){ $months = str_replace("September","Setembro",$months); if ($months[3] == "Setembro") { $datestring = "0915"; } if ($months[2] == "Setembro") { $lastmonth = "0915"; } if ($months[1] == "Setembro") { $monthsago = "0915"; } }elseif(array_search("October",$months) >= 1){ $months = str_replace("October","Outubro",$months); if ($months[3] == "Outubro") { $datestring = "1015"; } if ($months[2] == "Outubro") { $lastmonth = "1015"; } if ($months[1] == "Outubro") { $monthsago = "1015"; } }elseif(array_search("November",$months) >= 1){ $months = str_replace("November","Novembro",$months); if ($months[3] == "Novembro") { $datestring = "1115"; } if ($months[2] == "Novembro") { $lastmonth = "1115"; } if ($months[1] == "Novembro") { $monthsago = "1115"; } }elseif(array_search("December",$months) >= 1){ $months = str_replace("December","Dezembro",$months); if ($months[3] == "Dezembro") { $datestring = "1215"; } if ($months[2] == "Dezembro") { $lastmonth = "1215"; } if ($months[1] == "Dezembro") { $monthsago = "1215"; } } echo $months[2]. ' - ' . $monthago; ?>

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.0060.00919.39
8.3.30.0120.00319.42
8.3.20.0080.00020.29
8.3.10.0040.00421.95
8.3.00.0040.00421.01
8.2.170.0070.00722.96
8.2.160.0130.00722.21
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0000.00919.91
8.2.110.0040.00420.77
8.2.100.0060.00618.47
8.2.90.0040.00419.42
8.2.80.0040.00418.13
8.2.70.0040.00418.13
8.2.60.0000.01218.18
8.2.50.0030.00618.07
8.2.40.0120.00018.14
8.2.30.0080.00018.25
8.2.20.0000.00818.06
8.2.10.0000.00818.37
8.2.00.0020.00518.20
8.1.270.0030.00619.14
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0090.00024.01
8.1.230.0120.00019.27
8.1.220.0080.00018.01
8.1.210.0000.00818.77
8.1.200.0060.00617.48
8.1.190.0000.00817.60
8.1.180.0050.00318.10
8.1.170.0090.00019.03
8.1.160.0080.00022.19
8.1.150.0030.00719.18
8.1.140.0030.00617.75
8.1.130.0030.00318.07
8.1.120.0050.00217.71
8.1.110.0040.00417.86
8.1.100.0030.00517.87
8.1.90.0000.00817.89
8.1.80.0000.00717.81
8.1.70.0040.00417.86
8.1.60.0040.00417.89
8.1.50.0040.00417.80
8.1.40.0040.00417.82
8.1.30.0060.00317.87
8.1.20.0080.00017.98
8.1.10.0090.00017.91
8.1.00.0000.00817.76
8.0.300.0000.00718.77
8.0.290.0040.00417.13
8.0.280.0070.00018.75
8.0.270.0040.00417.61
8.0.260.0000.00717.47
8.0.250.0070.00017.37
8.0.240.0030.00317.29
8.0.230.0000.00717.41
8.0.220.0050.00217.30
8.0.210.0000.00717.27
8.0.200.0000.00717.37
8.0.190.0040.00417.40
8.0.180.0020.00517.18
8.0.170.0000.00817.35
8.0.160.0000.00717.22
8.0.150.0070.00017.39
8.0.140.0070.00017.24
8.0.130.0030.00613.79
8.0.120.0000.00817.25
8.0.110.0000.00817.27
8.0.100.0040.00417.20
8.0.90.0050.00217.22
8.0.80.0160.00017.29
8.0.70.0040.00417.38
8.0.60.0040.00417.16
8.0.50.0050.00317.30
8.0.30.0070.01417.58
8.0.20.0140.00817.46
8.0.10.0060.00317.28
8.0.00.0110.00717.11
7.4.330.0000.00515.31
7.4.320.0060.00017.02
7.4.300.0000.00716.99
7.4.290.0070.00016.96
7.4.280.0030.00616.80
7.4.270.0040.00416.82
7.4.260.0000.00716.91
7.4.250.0000.00816.73
7.4.240.0040.00416.91
7.4.230.0050.00216.78
7.4.220.0040.01516.93
7.4.210.0090.00516.86
7.4.200.0080.00017.08
7.4.160.0090.00616.72
7.4.150.0160.01017.40
7.4.140.0090.01217.86
7.4.130.0080.01316.87
7.4.120.0080.01117.06
7.4.110.0130.00616.77
7.4.100.0120.00616.96
7.4.90.0060.01116.88
7.4.80.0070.01019.39
7.4.70.0100.01016.94
7.4.60.0090.00916.96
7.4.50.0000.00816.88
7.4.40.0170.00017.05
7.4.30.0170.00617.05
7.4.00.0100.00714.95
7.3.330.0000.00613.45
7.3.320.0030.00313.60
7.3.310.0000.00716.70
7.3.300.0070.00016.71
7.3.290.0100.00716.59
7.3.280.0060.01316.63
7.3.270.0060.01917.40
7.3.260.0130.00316.93
7.3.250.0090.01216.95
7.3.240.0030.01416.68
7.3.230.0100.01017.02
7.3.210.0080.00816.80
7.3.200.0120.01119.39
7.3.190.0170.00716.90
7.3.180.0030.01316.80
7.3.170.0070.01116.82
7.3.160.0060.01016.75
7.2.330.0060.01217.16
7.2.320.0030.01517.20
7.2.310.0130.00317.01
7.2.300.0100.00616.90
7.2.290.0070.01017.12
7.2.60.0070.01016.86
7.2.00.0030.01319.66
7.1.100.0080.00418.54
7.1.70.0000.00817.44
7.1.60.0130.01319.46
7.1.50.0160.01017.15
7.1.00.0000.08022.44
7.0.200.0360.00814.85
7.0.140.0070.03022.22
7.0.100.0130.06720.06
7.0.90.0130.06020.05
7.0.80.0070.05720.13
7.0.70.0030.09020.24
7.0.60.0000.09020.03
7.0.50.0070.09020.50
7.0.40.0070.09019.99
7.0.30.0100.07720.19
7.0.20.0030.05320.17
7.0.10.0030.08020.07
7.0.00.0070.07320.17
5.6.280.0070.07021.12
5.6.250.0070.08020.80
5.6.240.0100.08320.72
5.6.230.0230.06720.68
5.6.220.0000.07720.54
5.6.210.0100.06320.51
5.6.200.0070.04721.03
5.6.190.0100.08721.00
5.6.180.0100.07021.18
5.6.170.0070.08321.00
5.6.160.0000.10021.13
5.6.150.0070.08021.15
5.6.140.0030.07321.05
5.6.130.0130.07721.16
5.6.120.0000.08721.13
5.6.110.0070.06021.16
5.6.100.0030.05021.14
5.6.90.0200.06721.13
5.6.80.0130.05720.54
5.6.70.0100.07320.43
5.6.60.0030.05720.44
5.6.50.0070.04720.51
5.6.40.0200.06720.46
5.6.30.0200.06720.46
5.6.20.0030.06720.52
5.6.10.0030.08320.42
5.6.00.0070.06020.46
5.5.380.0230.07020.49
5.5.370.0100.04320.44
5.5.360.0130.07720.46
5.5.350.0100.06720.38
5.5.340.0030.07320.82
5.5.330.0130.06720.88
5.5.320.0030.08020.94
5.5.310.0070.04720.82
5.5.300.0030.08020.82
5.5.290.0130.04020.93
5.5.280.0000.07320.81
5.5.270.0070.04320.81
5.5.260.0130.07020.87
5.5.250.0100.04020.73
5.5.240.0030.05020.23
5.5.230.0030.06720.32
5.5.220.0030.04720.22
5.5.210.0030.08720.21
5.5.200.0070.04020.27
5.5.190.0030.07020.29
5.5.180.0200.07020.31
5.5.160.0070.08020.19
5.5.150.0100.07320.20
5.5.140.0070.06020.32
5.5.130.0100.07720.23
5.5.120.0070.07320.17
5.5.110.0100.07720.31
5.5.100.0130.07020.23
5.5.90.0070.05020.02
5.5.80.0070.04720.02
5.5.70.0030.04720.13
5.5.60.0030.07320.05
5.5.50.0100.06320.08
5.5.40.0100.05720.08
5.5.30.0100.07320.20
5.5.20.0000.08320.19
5.5.10.0070.04720.17
5.5.00.0030.08020.08
5.4.450.0130.08319.31
5.4.440.0130.07019.14
5.4.430.0100.06719.37
5.4.420.0100.08019.45
5.4.410.0100.07319.26
5.4.400.0100.05019.24
5.4.390.0000.05719.08
5.4.380.0100.04019.13
5.4.370.0030.06019.08
5.4.360.0100.07719.08
5.4.350.0170.05019.11
5.4.340.0100.07019.06
5.4.320.0100.08018.79
5.4.310.0170.06318.96
5.4.300.0130.07019.03
5.4.290.0070.08018.98
5.4.280.0070.06019.12
5.4.270.0100.07719.07
5.4.260.0130.06318.80
5.4.250.0070.07018.81
5.4.240.0200.06318.98
5.4.230.0100.05719.23
5.4.220.0130.03719.00
5.4.210.0030.08019.12
5.4.200.0030.06018.97
5.4.190.0130.07019.03
5.4.180.0130.07019.05
5.4.170.0030.04719.02
5.4.160.0030.08319.26
5.4.150.0030.08018.77
5.4.140.0000.04716.43
5.4.130.0030.07016.19
5.4.120.0100.06716.20
5.4.110.0070.04016.39
5.4.100.0030.07316.39
5.4.90.0170.05716.38
5.4.80.0070.06716.26
5.4.70.0000.05716.37
5.4.60.0030.06016.41
5.4.50.0030.07016.39
5.4.40.0200.05316.39
5.4.30.0100.06316.40
5.4.20.0170.06716.29
5.4.10.0030.04716.43
5.4.00.0100.03315.84

preferences:
37.43 ms | 400 KiB | 5 Q