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[2] == "Janeiro") { $datestring = '0115'; } if ($months[1] == "Janeiro") { $lastmonth = "0115"; } if ($months[0] == "Janeiro") { $monthsago = "0115"; } }elseif(array_search("February",$months) >= 1){ $months = str_replace("February","Fevereiro",$months); if ($months[2] == "Fevereiro") { $datestring = "0215"; } if ($months[1] == "Fevereiro") { $lastmonth = "0215"; } if ($months[0] == "Fevereiro") { $monthsago = "0215"; } }elseif(array_search("March",$months) >= 1){ $months = str_replace("March","Março",$months); if ($months[2] == "Março") { $datestring = "0315"; } if ($months[1] == "Março") { $lastmonth = "0315"; } if ($months[0] == "Março") { $monthsago = "0315"; } }elseif(array_search("April",$months) >= 1){ $months = str_replace("April","Abril",$months); if ($months[2] == "Abril") { $datestring = "0415"; } if ($months[1] == "Abril") { $lastmonth = "0415"; } if ($months[0] == "Abril") { $monthsago = "0415"; } }elseif(array_search("May",$months) >= 1){ $months = str_replace("May","Maio",$months); if ($months[2] == "Maio") { $datestring = "0515"; } if ($months[1] == "Maio") { $lastmonth = "0515"; } if ($months[0] == "Maio") { $monthsago = "0515"; } }elseif(array_search("June",$months) >= 1){ $months = str_replace("June","Junho",$months); if ($months[2] == "Junho") { $datestring = "0615"; } if ($months[1] == "Junho") { $lastmonth = "0615"; } if ($months[0] == "Junho") { $monthsago = "0615"; } }elseif(array_search("July",$months) >= 1){ $months = str_replace("July","Julho",$months); if ($months[2] == "Julho") { $datestring = "0715"; } if ($months[1] == "Julho") { $lastmonth = "0715"; } if ($months[0] == "Julho") { $monthsago = "0715"; } }elseif(array_search("August",$months) >= 1){ $months = str_replace("August","Agosto",$months); if ($months[2] == "Agosto") { $datestring = "0815"; } if ($months[1] == "Agosto") { $lastmonth = "0815"; } if ($months[0] == "Agosto") { $monthsago = "0815"; } }elseif(array_search("September",$months) >= 1){ $months = str_replace("September","Setembro",$months); if ($months[2] == "Setembro") { $datestring = "0915"; } if ($months[1] == "Setembro") { $lastmonth = "0915"; } if ($months[0] == "Setembro") { $monthsago = "0915"; } }elseif(array_search("October",$months) >= 1){ $months = str_replace("October","Outubro",$months); if ($months[2] == "Outubro") { $datestring = "1015"; } if ($months[1] == "Outubro") { $lastmonth = "1015"; } if ($months[0] == "Outubro") { $monthsago = "1015"; } }elseif(array_search("November",$months) >= 1){ $months = str_replace("November","Novembro",$months); if ($months[2] == "Novembro") { $datestring = "1115"; } if ($months[1] == "Novembro") { $lastmonth = "1115"; } if ($months[0] == "Novembro") { $monthsago = "1115"; } }elseif(array_search("December",$months) >= 1){ $months = str_replace("December","Dezembro",$months); if ($months[2] == "Dezembro") { $datestring = "1215"; } if ($months[1] == "Dezembro") { $lastmonth = "1215"; } if ($months[0] == "Dezembro") { $monthsago = "1215"; } } print_r($months[2].$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.0180.00317.00
8.3.50.0140.00622.24
8.3.40.0090.00919.05
8.3.30.0120.00319.37
8.3.20.0060.00320.16
8.3.10.0030.00622.07
8.3.00.0080.00021.02
8.2.180.0090.01218.66
8.2.170.0090.00619.35
8.2.160.0100.00322.96
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00819.82
8.2.110.0030.00720.49
8.2.100.0000.01118.25
8.2.90.0080.00019.44
8.2.80.0080.00018.13
8.2.70.0060.00318.00
8.2.60.0000.00918.41
8.2.50.0040.00418.13
8.2.40.0000.00918.41
8.2.30.0080.00018.28
8.2.20.0030.00618.13
8.2.10.0060.00318.47
8.2.00.0050.00318.12
8.1.280.0090.00925.92
8.1.270.0000.00819.16
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00324.04
8.1.230.0040.00719.26
8.1.220.0040.00418.04
8.1.210.0000.00918.77
8.1.200.0030.00617.73
8.1.190.0000.00817.60
8.1.180.0060.00318.10
8.1.170.0090.00018.96
8.1.160.0000.00722.14
8.1.150.0060.00319.13
8.1.140.0000.00817.73
8.1.130.0030.00318.02
8.1.120.0070.00017.84
8.1.110.0040.00417.88
8.1.100.0060.00317.82
8.1.90.0020.00517.77
8.1.80.0050.00217.83
8.1.70.0080.00017.81
8.1.60.0040.00417.94
8.1.50.0040.00417.81
8.1.40.0030.00517.84
8.1.30.0000.00817.81
8.1.20.0040.00417.95
8.1.10.0080.00017.78
8.1.00.0000.00817.85
8.0.300.0030.00618.77
8.0.290.0040.00417.25
8.0.280.0070.00018.75
8.0.270.0030.00317.45
8.0.260.0030.00317.48
8.0.250.0000.00717.27
8.0.240.0030.00317.35
8.0.230.0040.00417.39
8.0.220.0040.00417.30
8.0.210.0070.00017.18
8.0.200.0000.00717.36
8.0.190.0000.00917.23
8.0.180.0040.00417.34
8.0.170.0000.00817.19
8.0.160.0000.00717.37
8.0.150.0050.00317.25
8.0.140.0080.00017.36
8.0.130.0000.00713.71
8.0.120.0090.00017.20
8.0.110.0050.00317.24
8.0.100.0030.00517.20
8.0.90.0000.00817.24
8.0.80.0080.00817.27
8.0.70.0040.00417.36
8.0.60.0000.00717.14
8.0.50.0040.00417.36
8.0.30.0140.00717.45
8.0.20.0060.01417.54
8.0.10.0000.00817.27
8.0.00.0080.01017.21
7.4.330.0000.00615.36
7.4.320.0040.00416.83
7.4.300.0030.00316.91
7.4.290.0000.00816.97
7.4.280.0040.00416.70
7.4.270.0040.00316.97
7.4.260.0000.00716.86
7.4.250.0020.00516.93
7.4.240.0020.00516.82
7.4.230.0000.00817.01
7.4.220.0100.00916.87
7.4.210.0090.00617.04
7.4.200.0050.00216.73
7.4.160.0090.00616.68
7.4.150.0160.00317.40
7.4.140.0120.01017.86
7.4.130.0050.01716.92
7.4.120.0070.01116.93
7.4.110.0120.01216.75
7.4.100.0140.00316.92
7.4.90.0000.01717.00
7.4.80.0110.01219.39
7.4.70.0060.01316.97
7.4.60.0070.01716.97
7.4.50.0000.00816.88
7.4.40.0090.01216.68
7.4.30.0080.00816.73
7.4.00.0110.00715.13
7.3.330.0030.00413.45
7.3.320.0030.00313.45
7.3.310.0070.00016.75
7.3.300.0070.00016.61
7.3.290.0090.00616.63
7.3.280.0100.00816.63
7.3.270.0120.00617.40
7.3.260.0120.00616.91
7.3.250.0110.00716.79
7.3.240.0080.00816.77
7.3.230.0130.00616.91
7.3.210.0060.01616.94
7.3.200.0070.01119.39
7.3.190.0130.00316.84
7.3.180.0070.01016.73
7.3.170.0030.01616.95
7.3.160.0060.01016.85
7.2.330.0070.01017.09
7.2.320.0180.00317.28
7.2.310.0130.00316.82
7.2.300.0130.00316.95
7.2.290.0060.01217.17
7.2.60.0060.00917.11
7.2.00.0000.01319.49
7.1.200.0070.00715.83
7.1.100.0040.00818.34
7.1.70.0100.00617.45
7.1.60.0160.00319.46
7.1.50.0130.01317.31
7.1.00.0030.07722.26
7.0.200.0160.00914.70
7.0.140.0000.04022.13
7.0.100.0330.08320.07
7.0.90.0300.04720.25
7.0.80.0300.06020.00
7.0.70.0300.07320.09
7.0.60.0230.06720.08
7.0.50.0130.04320.46
7.0.40.0200.07320.09
7.0.30.0170.06720.03
7.0.20.0100.08320.11
7.0.10.0100.04720.09
7.0.00.0030.09020.03
5.6.280.0100.06720.98
5.6.250.0100.06720.74
5.6.240.0030.05320.65
5.6.230.0100.08020.65
5.6.220.0100.07320.73
5.6.210.0130.07720.72
5.6.200.0130.08021.14
5.6.190.0130.07721.07
5.6.180.0100.08321.23
5.6.170.0230.07720.96
5.6.160.0100.06721.07
5.6.150.0030.05021.22
5.6.140.0070.08321.09
5.6.130.0170.07721.07
5.6.120.0030.05021.10
5.6.110.0100.08020.96
5.6.100.0030.05320.98
5.6.90.0100.05020.98
5.6.80.0100.05020.39
5.6.70.0130.07020.39
5.6.60.0130.06720.59
5.6.50.0170.07320.46
5.6.40.0070.07320.57
5.6.30.0070.08720.41
5.6.20.0100.08320.44
5.6.10.0000.05020.41
5.6.00.0130.07020.44
5.5.380.0100.07320.46
5.5.370.0130.06320.48
5.5.360.0130.08020.55
5.5.350.0130.07320.38
5.5.340.0130.07320.95
5.5.330.0070.06720.79
5.5.320.0100.08020.93
5.5.310.0130.08020.82
5.5.300.0130.07020.88
5.5.290.0070.05020.97
5.5.280.0070.08720.69
5.5.270.0030.08320.80
5.5.260.0170.07720.97
5.5.250.0100.08020.79
5.5.240.0070.08020.36
5.5.230.0070.04720.33
5.5.220.0000.04320.31
5.5.210.0130.07020.22
5.5.200.0200.06720.33
5.5.190.0130.08720.16
5.5.180.0130.07720.18
5.5.160.0130.07020.33
5.5.150.0130.07720.30
5.5.140.0030.04720.20
5.5.130.0030.04020.23
5.5.120.0100.07020.32
5.5.110.0100.04020.13
5.5.100.0130.07320.13
5.5.90.0070.08720.11
5.5.80.0070.05020.12
5.5.70.0070.05320.08
5.5.60.0100.07019.98
5.5.50.0130.07320.05
5.5.40.0070.07020.18
5.5.30.0030.07319.97
5.5.20.0030.08020.18
5.5.10.0100.05020.12
5.5.00.0070.07320.17
5.4.450.0030.08319.36
5.4.440.0070.07719.42
5.4.430.0070.08319.47
5.4.420.0130.07319.55
5.4.410.0030.05019.25
5.4.400.0130.07019.08
5.4.390.0070.08319.05
5.4.380.0100.07318.95
5.4.370.0130.06718.79
5.4.360.0030.08019.10
5.4.350.0030.04719.14
5.4.340.0070.06018.88
5.4.320.0170.06319.13
5.4.310.0070.07019.07
5.4.300.0030.07019.12
5.4.290.0100.07719.03
5.4.280.0030.07718.81
5.4.270.0000.05319.23
5.4.260.0200.06718.81
5.4.250.0030.06318.98
5.4.240.0170.05719.05
5.4.230.0100.07318.94
5.4.220.0000.08019.02
5.4.210.0070.07319.12
5.4.200.0070.08319.14
5.4.190.0100.05019.04
5.4.180.0130.03018.78
5.4.170.0030.04019.09
5.4.160.0170.04719.10
5.4.150.0130.07719.10
5.4.140.0030.07016.33
5.4.130.0000.08016.32
5.4.120.0130.06316.32
5.4.110.0100.06716.29
5.4.100.0030.07016.28
5.4.90.0100.06716.48
5.4.80.0100.07316.25
5.4.70.0170.06716.48
5.4.60.0070.05316.28
5.4.50.0200.07016.27
5.4.40.0100.07316.25
5.4.30.0070.06716.36
5.4.20.0030.07716.29
5.4.10.0070.06316.26
5.4.00.0030.07715.77

preferences:
44.5 ms | 401 KiB | 5 Q