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[1]. '-' .$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.0070.01122.17
8.3.40.0070.00719.38
8.3.30.0060.01019.34
8.3.20.0040.00420.49
8.3.10.0000.00821.98
8.3.00.0080.00020.80
8.2.180.0150.00318.40
8.2.170.0090.00619.29
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00819.78
8.2.110.0030.00620.61
8.2.100.0030.01018.47
8.2.90.0050.00319.42
8.2.80.0060.00318.13
8.2.70.0030.00618.00
8.2.60.0060.00318.18
8.2.50.0040.00418.07
8.2.40.0070.00318.16
8.2.30.0060.00318.38
8.2.20.0000.00818.09
8.2.10.0000.00818.43
8.2.00.0060.00318.18
8.1.280.0090.00625.92
8.1.270.0080.00419.08
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0000.00924.05
8.1.230.0110.00019.20
8.1.220.0000.00817.90
8.1.210.0050.00318.77
8.1.200.0060.00317.61
8.1.190.0000.00817.59
8.1.180.0000.00818.10
8.1.170.0060.00318.90
8.1.160.0000.00722.11
8.1.150.0080.00419.04
8.1.140.0060.00319.48
8.1.130.0000.00718.00
8.1.120.0040.00417.82
8.1.110.0000.00817.84
8.1.100.0030.00617.73
8.1.90.0040.00417.81
8.1.80.0000.00717.70
8.1.70.0070.00017.85
8.1.60.0030.00617.75
8.1.50.0000.00817.75
8.1.40.0040.00417.78
8.1.30.0030.00617.98
8.1.20.0040.00417.79
8.1.10.0000.00917.88
8.1.00.0060.00317.77
8.0.300.0040.00418.77
8.0.290.0000.00717.25
8.0.280.0070.00018.60
8.0.270.0000.00717.56
8.0.260.0030.00318.79
8.0.250.0000.00717.38
8.0.240.0000.00717.39
8.0.230.0000.00717.39
8.0.220.0040.00417.23
8.0.210.0070.00017.28
8.0.200.0030.00317.43
8.0.190.0060.00317.24
8.0.180.0040.00417.34
8.0.170.0030.00517.38
8.0.160.0000.00817.43
8.0.150.0040.00417.32
8.0.140.0000.00717.30
8.0.130.0060.00313.73
8.0.120.0000.00817.23
8.0.110.0050.00217.24
8.0.100.0000.00817.34
8.0.90.0000.00817.28
8.0.80.0100.01017.30
8.0.70.0040.00417.18
8.0.60.0040.00417.27
8.0.50.0050.00317.16
8.0.30.0120.01117.62
8.0.20.0160.01017.40
8.0.10.0030.00517.48
8.0.00.0080.01117.00
7.4.330.0050.00015.34
7.4.320.0030.00316.77
7.4.300.0060.00016.98
7.4.290.0070.00016.95
7.4.280.0040.00416.77
7.4.270.0000.00716.92
7.4.260.0030.00316.83
7.4.250.0080.00016.94
7.4.240.0050.00316.98
7.4.230.0000.00817.07
7.4.220.0100.00716.99
7.4.210.0070.01017.00
7.4.200.0000.00816.77
7.4.160.0150.00017.02
7.4.150.0120.01117.40
7.4.140.0100.01417.86
7.4.130.0110.01116.94
7.4.120.0100.00716.87
7.4.110.0090.00917.00
7.4.100.0040.01416.96
7.4.90.0090.00916.92
7.4.80.0130.01019.39
7.4.70.0030.01516.98
7.4.60.0100.01016.81
7.4.50.0030.00617.05
7.4.40.0100.00716.84
7.4.30.0030.01417.09
7.4.00.0060.00915.34
7.3.330.0000.00613.69
7.3.320.0050.00013.50
7.3.310.0040.00416.79
7.3.300.0030.00616.68
7.3.290.0110.00516.66
7.3.280.0100.00716.63
7.3.270.0090.01617.40
7.3.260.0060.01017.03
7.3.250.0060.01516.70
7.3.240.0130.00316.93
7.3.230.0040.02016.83
7.3.210.0100.00716.85
7.3.200.0100.01119.39
7.3.190.0110.00717.01
7.3.180.0160.00016.85
7.3.170.0060.01216.70
7.3.160.0060.01016.98
7.2.330.0100.01017.01
7.2.320.0140.00717.21
7.2.310.0110.00616.74
7.2.300.0140.00417.02
7.2.290.0150.00317.11
7.2.60.0130.00316.71
7.2.00.0040.01219.38
7.1.100.0090.00618.44
7.1.70.0040.00417.54
7.1.60.0110.01119.46
7.1.50.0070.01417.43
7.1.00.0070.07022.48
7.0.200.0330.00314.82
7.0.140.0000.04721.95
7.0.100.0100.08020.03
7.0.90.0100.08719.98
7.0.80.0170.07019.96
7.0.70.0230.05319.92
7.0.60.0130.08019.92
7.0.50.0070.08720.22
7.0.40.0100.08320.09
7.0.30.0030.09320.10
7.0.20.0100.06319.98
7.0.10.0170.07320.03
7.0.00.0070.07320.00
5.6.280.0030.07321.09
5.6.250.0070.08320.57
5.6.240.0070.07720.72
5.6.230.0100.06720.69
5.6.220.0130.07720.50
5.6.210.0030.08720.48
5.6.200.0100.05721.07
5.6.190.0200.06720.96
5.6.180.0200.07320.96
5.6.170.0100.08321.04
5.6.160.0030.05321.05
5.6.150.0100.08320.99
5.6.140.0070.07321.04
5.6.130.0070.08321.02
5.6.120.0130.07721.04
5.6.110.0100.07021.02
5.6.100.0130.07721.01
5.6.90.0070.05020.94
5.6.80.0100.07320.43
5.6.70.0200.06320.34
5.6.60.0000.05020.54
5.6.50.0100.05020.53
5.6.40.0130.05720.39
5.6.30.0070.06720.44
5.6.20.0170.07320.39
5.6.10.0070.07720.44
5.6.00.0100.07020.37
5.5.380.0030.06320.54
5.5.370.0070.06720.38
5.5.360.0130.08020.49
5.5.350.0130.07720.39
5.5.340.0100.08020.91
5.5.330.0100.05320.80
5.5.320.0170.07020.89
5.5.310.0170.05320.84
5.5.300.0070.08720.76
5.5.290.0100.07320.80
5.5.280.0130.08020.92
5.5.270.0170.07720.73
5.5.260.0070.07720.88
5.5.250.0070.08320.45
5.5.240.0070.07720.03
5.5.230.0130.07020.25
5.5.220.0000.08320.14
5.5.210.0100.07720.29
5.5.200.0170.07320.16
5.5.190.0030.08320.15
5.5.180.0100.07719.99
5.5.160.0100.07020.25
5.5.150.0100.08020.18
5.5.140.0200.06720.24
5.5.130.0130.07020.22
5.5.120.0100.07720.28
5.5.110.0100.08020.23
5.5.100.0100.06720.11
5.5.90.0200.07020.15
5.5.80.0070.06020.07
5.5.70.0030.08020.14
5.5.60.0130.06320.06
5.5.50.0100.07320.10
5.5.40.0130.06720.03
5.5.30.0030.08320.04
5.5.20.0000.05720.01
5.5.10.0100.06320.04
5.5.00.0200.06319.95
5.4.450.0100.07719.37
5.4.440.0130.07019.28
5.4.430.0070.08719.55
5.4.420.0170.06319.44
5.4.410.0070.06719.30
5.4.400.0130.06318.95
5.4.390.0100.07319.04
5.4.380.0130.07018.91
5.4.370.0130.06019.15
5.4.360.0070.07319.13
5.4.350.0070.07018.80
5.4.340.0030.08018.99
5.4.320.0100.06019.04
5.4.310.0100.06318.97
5.4.300.0130.04319.12
5.4.290.0070.04018.99
5.4.280.0070.07018.82
5.4.270.0000.08019.06
5.4.260.0130.07319.03
5.4.250.0070.07318.95
5.4.240.0070.07318.89
5.4.230.0070.07019.14
5.4.220.0130.06319.00
5.4.210.0030.07319.23
5.4.200.0070.05018.90
5.4.190.0100.07019.22
5.4.180.0070.06719.04
5.4.170.0070.04719.22
5.4.160.0030.07318.96
5.4.150.0070.07018.96
5.4.140.0070.06016.07
5.4.130.0100.07016.29
5.4.120.0100.06316.36
5.4.110.0170.06316.32
5.4.100.0130.06016.47
5.4.90.0100.07016.27
5.4.80.0030.06016.48
5.4.70.0130.06316.26
5.4.60.0070.07316.37
5.4.50.0100.06716.46
5.4.40.0030.06016.25
5.4.30.0100.06316.25
5.4.20.0170.06316.26
5.4.10.0170.06016.25
5.4.00.0070.07015.75

preferences:
36.15 ms | 401 KiB | 5 Q