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[3].$datestring ?>

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.0120.00616.88
8.3.50.0050.01422.05
8.3.40.0110.00419.20
8.3.30.0040.01119.47
8.3.20.0000.00820.29
8.3.10.0040.00421.90
8.3.00.0060.00320.89
8.2.180.0090.00618.91
8.2.170.0150.00022.96
8.2.160.0070.00722.07
8.2.150.0070.00724.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.80
8.2.110.0040.01120.60
8.2.100.0090.00618.28
8.2.90.0000.00819.46
8.2.80.0000.00818.13
8.2.70.0060.00318.00
8.2.60.0060.00618.30
8.2.50.0060.00318.13
8.2.40.0000.01018.28
8.2.30.0040.00418.43
8.2.20.0030.00518.23
8.2.10.0040.00418.30
8.2.00.0020.00518.05
8.1.280.0070.01125.92
8.1.270.0080.00019.25
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0140.00723.65
8.1.230.0040.00721.04
8.1.220.0040.00418.13
8.1.210.0030.00518.77
8.1.200.0040.00417.60
8.1.190.0030.00517.60
8.1.180.0080.00018.10
8.1.170.0080.00018.96
8.1.160.0040.00422.11
8.1.150.0050.00519.19
8.1.140.0040.00417.70
8.1.130.0050.00217.98
8.1.120.0000.00717.84
8.1.110.0060.00317.73
8.1.100.0040.00417.72
8.1.90.0040.00417.83
8.1.80.0080.00017.73
8.1.70.0000.00717.73
8.1.60.0000.00817.93
8.1.50.0030.00517.84
8.1.40.0040.00417.82
8.1.30.0040.00417.88
8.1.20.0030.00517.95
8.1.10.0040.00417.75
8.1.00.0040.00417.74
8.0.300.0040.00418.77
8.0.290.0090.00017.11
8.0.280.0000.00718.66
8.0.270.0030.00317.45
8.0.260.0030.00317.53
8.0.250.0030.00517.34
8.0.240.0070.00017.39
8.0.230.0040.00417.34
8.0.220.0030.00317.37
8.0.210.0040.00417.21
8.0.200.0000.00817.39
8.0.190.0000.00817.37
8.0.180.0040.00417.32
8.0.170.0050.00317.35
8.0.160.0040.00417.30
8.0.150.0050.00317.33
8.0.140.0030.00517.30
8.0.130.0060.00013.74
8.0.120.0000.00817.17
8.0.110.0060.00317.36
8.0.100.0040.00417.36
8.0.90.0050.00317.30
8.0.80.0060.01217.39
8.0.70.0080.00017.17
8.0.60.0000.00717.37
8.0.50.0000.00817.36
8.0.30.0060.01317.40
8.0.20.0090.01417.47
8.0.10.0040.00417.33
8.0.00.0080.01017.15
7.4.330.0000.00515.36
7.4.320.0030.00316.96
7.4.300.0000.00616.98
7.4.290.0050.00316.95
7.4.280.0000.00816.86
7.4.270.0070.00016.83
7.4.260.0050.00516.85
7.4.250.0050.00216.84
7.4.240.0060.00216.85
7.4.230.0030.00317.07
7.4.220.0030.01616.98
7.4.210.0040.01516.85
7.4.200.0050.00316.90
7.4.160.0000.01616.79
7.4.150.0070.01517.40
7.4.140.0060.01417.86
7.4.130.0120.01016.93
7.4.120.0090.00916.91
7.4.110.0100.01417.14
7.4.100.0070.01716.77
7.4.90.0090.01516.99
7.4.80.0090.00919.39
7.4.70.0140.00316.89
7.4.60.0030.01717.00
7.4.50.0030.00516.57
7.4.40.0100.00716.96
7.4.30.0100.00716.82
7.4.00.0000.01615.48
7.3.330.0000.00513.57
7.3.320.0000.00613.53
7.3.310.0030.00316.70
7.3.300.0040.00416.73
7.3.290.0050.01016.71
7.3.280.0140.00416.61
7.3.270.0130.01017.40
7.3.260.0060.01116.94
7.3.250.0090.01016.90
7.3.240.0080.00816.88
7.3.230.0130.01016.84
7.3.210.0070.01016.91
7.3.200.0110.01419.39
7.3.190.0060.01016.61
7.3.180.0080.00816.79
7.3.170.0150.00316.95
7.3.160.0030.01316.81
7.2.330.0130.00617.27
7.2.320.0090.01216.97
7.2.310.0100.00616.92
7.2.300.0070.01017.02
7.2.290.0180.00416.91
7.2.80.0090.00816.80
7.2.60.0040.01117.28
7.2.50.0130.00317.15
7.2.00.0030.01019.77
7.1.200.0070.00016.08
7.1.100.0030.01018.04
7.1.70.0000.00817.60
7.1.60.0030.02019.46
7.1.50.0100.01317.35
7.1.00.0000.08022.33
7.0.200.0200.00815.14
7.0.140.0000.03721.95
7.0.100.0230.06720.04
7.0.90.0230.10320.10
7.0.80.0170.07320.07
7.0.70.0170.08020.01
7.0.60.0170.08319.99
7.0.50.0130.07020.51
7.0.40.0030.09020.04
7.0.30.0170.06320.14
7.0.20.0230.06320.13
7.0.10.0100.07720.12
7.0.00.0100.05720.12
5.6.280.0030.07321.18
5.6.250.0100.04020.67
5.6.240.0070.08320.65
5.6.230.0070.08720.64
5.6.220.0070.06320.67
5.6.210.0130.07320.61
5.6.200.0170.07321.13
5.6.190.0130.07321.04
5.6.180.0030.05321.08
5.6.170.0130.05021.23
5.6.160.0130.05720.99
5.6.150.0100.07721.19
5.6.140.0030.08321.08
5.6.130.0170.08321.07
5.6.120.0070.05721.21
5.6.110.0070.09021.15
5.6.100.0070.09021.21
5.6.90.0030.04720.99
5.6.80.0100.03720.40
5.6.70.0130.06720.53
5.6.60.0100.04320.36
5.6.50.0000.04720.54
5.6.40.0070.05320.51
5.6.30.0030.04720.47
5.6.20.0230.03720.44
5.6.10.0100.08320.42
5.6.00.0030.05020.48
5.5.380.0070.08320.44
5.5.370.0100.06020.47
5.5.360.0070.08320.60
5.5.350.0130.04320.37
5.5.340.0030.05020.93
5.5.330.0100.07320.98
5.5.320.0030.05320.96
5.5.310.0030.06720.92
5.5.300.0030.05720.88
5.5.290.0200.07320.95
5.5.280.0130.06720.98
5.5.270.0070.07720.80
5.5.260.0130.07020.73
5.5.250.0030.08020.64
5.5.240.0070.03720.27
5.5.230.0100.06320.24
5.5.220.0000.04320.34
5.5.210.0070.04720.23
5.5.200.0100.07020.29
5.5.190.0070.04720.19
5.5.180.0000.06720.04
5.5.160.0200.06320.23
5.5.150.0030.08020.28
5.5.140.0070.06720.32
5.5.130.0070.04320.25
5.5.120.0000.07720.16
5.5.110.0130.05320.31
5.5.100.0070.05020.00
5.5.90.0200.03320.21
5.5.80.0070.06020.21
5.5.70.0130.06719.99
5.5.60.0200.05020.12
5.5.50.0030.04020.12
5.5.40.0100.06020.14
5.5.30.0070.05320.00
5.5.20.0070.03720.14
5.5.10.0070.04320.05
5.5.00.0000.05320.15
5.4.450.0230.06019.41
5.4.440.0030.05719.12
5.4.430.0000.06319.35
5.4.420.0030.07319.37
5.4.410.0100.04319.30
5.4.400.0130.03719.15
5.4.390.0000.06018.97
5.4.380.0070.05719.03
5.4.370.0070.06019.03
5.4.360.0030.07719.10
5.4.350.0170.06718.84
5.4.340.0030.05319.10
5.4.320.0130.03318.95
5.4.310.0070.06719.12
5.4.300.0000.07318.90
5.4.290.0070.07718.88
5.4.280.0200.06019.14
5.4.270.0030.08019.20
5.4.260.0030.08019.05
5.4.250.0230.05319.14
5.4.240.0100.07319.07
5.4.230.0070.03719.07
5.4.220.0100.03318.99
5.4.210.0000.04018.81
5.4.200.0070.04318.78
5.4.190.0070.07319.11
5.4.180.0030.04719.02
5.4.170.0100.07319.10
5.4.160.0170.05018.79
5.4.150.0030.05319.08
5.4.140.0070.07716.41
5.4.130.0030.07316.40
5.4.120.0030.07016.40
5.4.110.0100.06716.50
5.4.100.0070.07316.23
5.4.90.0030.08016.46
5.4.80.0100.06716.39
5.4.70.0130.05716.35
5.4.60.0100.06316.27
5.4.50.0030.06716.41
5.4.40.0070.06016.33
5.4.30.0100.06716.23
5.4.20.0100.05016.41
5.4.10.0000.08016.29
5.4.00.0070.07315.61

preferences:
48.73 ms | 401 KiB | 5 Q