3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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($months == "January"){ $months = "Janeiro"; if ($months[3] == "Janeiro") { $datestring = '0115'; } if ($months[2] == "Janeiro") { $lastmonth = "0115"; } if ($months[1] == "Janeiro") { $monthsago = "0115"; } }elseif($months == "February"){ $months = "Fevereiro"; if ($months[3] == "Fevereiro") { $datestring = "0215"; } if ($months[2] == "Fevereiro") { $lastmonth = "0215"; } if ($months[1] == "Fevereiro") { $monthsago = "0215"; } }elseif($months == "March"){ $months = "Mar����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������§o"; 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($months == "May"){ $months = "Maio"; if ($months[3] == "Maio") { $datestring = "0515"; } if ($months[2] == "Maio") { $lastmonth = "0515"; } if ($months[1] == "Maio") { $monthsago = "0515"; } }elseif($months == "June"){ $months = "Junho"; if ($months[3] == "Junho") { $datestring = "0615"; } if ($months[2] == "Junho") { $lastmonth = "0615"; } if ($months[1] == "Junho") { $monthsago = "0615"; } }elseif($months == "July"){ $months = "Julho"; if ($months[3] == "Julho") { $datestring = "0715"; } if ($months[2] == "Julho") { $lastmonth = "0715"; } if ($months[1] == "Julho") { $monthsago = "0715"; } }elseif($months == "August"){ $months = "Agosto"; if ($months[3] == "Agosto") { $datestring = "0815"; } if ($months[2] == "Agosto") { $lastmonth = "0815"; } if ($months[1] == "Agosto") { $monthsago = "0815"; } }elseif($months == "September"){ $months = "Setembro"; if ($months[3] == "Setembro") { $datestring = "0915"; } if ($months[2] == "Setembro") { $lastmonth = "0915"; } if ($months[1] == "Setembro") { $monthsago = "0915"; } }elseif($months == "October"){ $months = "Outubro"; if ($months[3] == "Outubro") { $datestring = "1015"; } if ($months[2] == "Outubro") { $lastmonth = "1015"; } if ($months[1] == "Outubro") { $monthsago = "1015"; } }elseif($months == "November"){ $months = "Novembro"; if ($months[3] == "Novembro") { $datestring = "1115"; } if ($months[2] == "Novembro") { $lastmonth = "1115"; } if ($months[1] == "Novembro") { $monthsago = "1115"; } }elseif($months == "December"){ $months = "Dezembro"; if ($months[3] == "Dezembro") { $datestring = "1215"; } if ($months[2] == "Dezembro") { $lastmonth = "1215"; } if ($months[1] == "Dezembro") { $monthsago = "1215"; } } echo $months[2].$lastmonth; ?>

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.0090.00618.96
8.3.30.0140.00419.34
8.3.20.0080.00020.34
8.3.10.0050.00321.73
8.3.00.0080.00021.02
8.2.170.0120.00322.96
8.2.160.0110.00422.17
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0060.00319.91
8.2.110.0030.00620.82
8.2.100.0090.00318.47
8.2.90.0040.00419.42
8.2.80.0040.00417.97
8.2.70.0050.00318.00
8.2.60.0040.00718.18
8.2.50.0080.00018.13
8.2.40.0090.00318.59
8.2.30.0040.00418.34
8.2.20.0000.00818.16
8.2.10.0040.00418.23
8.2.00.0000.00718.16
8.1.270.0000.00919.25
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.73
8.1.230.0030.00919.41
8.1.220.0000.00817.80
8.1.210.0050.00318.77
8.1.200.0030.01117.38
8.1.190.0000.00817.60
8.1.180.0040.00418.10
8.1.170.0050.00318.95
8.1.160.0080.00022.09
8.1.150.0030.00619.11
8.1.140.0030.00517.80
8.1.130.0030.00318.13
8.1.120.0000.00717.84
8.1.110.0040.00417.73
8.1.100.0020.00517.79
8.1.90.0040.00417.80
8.1.80.0080.00017.86
8.1.70.0030.00317.70
8.1.60.0040.00417.95
8.1.50.0030.00617.71
8.1.40.0000.00917.70
8.1.30.0040.00417.90
8.1.20.0050.00317.95
8.1.10.0050.00317.75
8.1.00.0050.00317.82
8.0.300.0070.00018.77
8.0.290.0000.00717.25
8.0.280.0020.00518.59
8.0.270.0040.00417.40
8.0.260.0030.00317.54
8.0.250.0000.00717.22
8.0.240.0070.00017.27
8.0.230.0000.00717.35
8.0.220.0040.00417.32
8.0.210.0050.00217.31
8.0.200.0050.00317.26
8.0.190.0040.00417.27
8.0.180.0000.00717.31
8.0.170.0040.00417.33
8.0.160.0070.00017.31
8.0.150.0000.00717.32
8.0.140.0000.00717.38
8.0.130.0000.00713.80
8.0.120.0040.00417.18
8.0.110.0000.00817.36
8.0.100.0000.00717.37
8.0.90.0000.00817.29
8.0.80.0070.01417.36
8.0.70.0000.00817.33
8.0.60.0000.00717.24
8.0.50.0040.00417.26
8.0.30.0150.00717.38
8.0.20.0150.01217.40
8.0.10.0040.00417.43
8.0.00.0100.00817.25
7.4.330.0020.00215.27
7.4.320.0000.00616.91
7.4.300.0030.00316.72
7.4.290.0030.00316.89
7.4.280.0040.00416.82
7.4.270.0070.00016.66
7.4.260.0000.00816.68
7.4.250.0030.00516.71
7.4.240.0020.00616.79
7.4.230.0030.00316.64
7.4.220.0120.00616.74
7.4.210.0060.00916.90
7.4.200.0040.00416.90
7.4.160.0080.00816.79
7.4.150.0110.01417.40
7.4.140.0060.01217.86
7.4.130.0140.00616.86
7.4.120.0110.00716.79
7.4.110.0070.01116.57
7.4.100.0120.01216.74
7.4.90.0030.01416.69
7.4.80.0150.00719.39
7.4.70.0070.01116.88
7.4.60.0070.01017.02
7.4.50.0040.00416.86
7.4.40.0090.01316.64
7.4.30.0130.01316.75
7.4.00.0000.01815.21
7.3.330.0000.00513.59
7.3.320.0000.00513.60
7.3.310.0000.00716.46
7.3.300.0000.00716.67
7.3.290.0070.00916.63
7.3.280.0080.00916.71
7.3.270.0110.00717.40
7.3.260.0150.00616.66
7.3.250.0100.01016.83
7.3.240.0120.00416.75
7.3.230.0130.00616.80
7.3.210.0100.00716.68
7.3.200.0160.00319.39
7.3.190.0060.01016.86
7.3.180.0070.01016.85
7.3.170.0130.00616.94
7.3.160.0080.00816.75
7.3.10.0040.01216.87
7.3.00.0090.00416.89
7.2.330.0060.01316.87
7.2.320.0060.01217.13
7.2.310.0060.00916.79
7.2.300.0100.00717.08
7.2.290.0100.00717.01
7.2.130.0040.00817.08
7.2.120.0070.00717.17
7.2.110.0050.00817.12
7.2.100.0050.01017.10
7.2.90.0030.01017.39
7.2.80.0050.01116.86
7.2.70.0050.00517.24
7.2.60.0080.00617.01
7.2.50.0060.00717.03
7.2.40.0050.00817.30
7.2.30.0050.00817.15
7.2.20.0120.00417.26
7.2.10.0040.01217.06
7.2.00.0080.00817.92
7.1.250.0070.00916.02
7.1.240.0060.00315.77
7.1.230.0060.00615.98
7.1.220.0030.00616.08
7.1.210.0030.00715.71
7.1.200.0070.00315.96
7.1.190.0050.00516.07
7.1.180.0070.00316.00
7.1.170.0060.00916.04
7.1.160.0000.01216.18
7.1.150.0070.00716.17
7.1.140.0030.01416.05
7.1.130.0060.00316.10
7.1.120.0080.00616.18
7.1.110.0030.00716.13
7.1.100.0000.01617.11
7.1.90.0100.00315.92
7.1.80.0090.00616.08
7.1.70.0070.00716.67
7.1.60.0040.01217.73
7.1.50.0090.01216.54
7.1.40.0030.01215.97
7.1.30.0060.00616.08
7.1.20.0090.00615.92
7.1.10.0060.00616.07
7.1.00.0030.04319.26
7.0.330.0050.00815.57
7.0.320.0000.01115.29
7.0.310.0070.00715.71
7.0.300.0070.00715.61
7.0.290.0000.00715.37
7.0.280.0030.01015.59
7.0.270.0060.00815.24
7.0.260.0060.01115.43
7.0.250.0120.00315.57
7.0.240.0040.01115.66
7.0.230.0060.00615.43
7.0.220.0070.01015.30
7.0.210.0070.00715.61
7.0.200.0330.00515.18
7.0.190.0080.00815.45
7.0.180.0120.00415.25
7.0.170.0060.00615.38
7.0.160.0060.00315.61
7.0.150.0070.00415.51
7.0.140.0030.02218.70
7.0.130.0060.00915.69
7.0.120.0040.01115.27
7.0.110.0110.00415.63
7.0.100.0110.04117.72
7.0.90.0120.03617.81
7.0.80.0030.03017.62
7.0.70.0050.02717.67
7.0.60.0080.03317.85
7.0.50.0310.03018.05
7.0.40.0130.02316.88
7.0.30.0060.03916.87
7.0.20.0070.03016.82
7.0.10.0090.04116.90
7.0.00.0080.04416.76
5.6.380.0040.00714.59
5.6.370.0060.00914.49
5.6.360.0080.00514.80
5.6.350.0090.00314.61
5.6.340.0000.01014.36
5.6.330.0000.01014.16
5.6.320.0040.01114.45
5.6.310.0100.00614.96
5.6.300.0140.00014.62
5.6.290.0070.00714.86
5.6.280.0020.05017.83
5.6.270.0040.01114.61
5.6.260.0070.00314.55
5.6.250.0050.04017.63
5.6.240.0050.04617.66
5.6.230.0070.04417.60
5.6.220.0050.04617.54
5.6.210.0090.04317.62
5.6.200.0050.04717.96
5.6.190.0080.04517.88
5.6.180.0050.04517.77
5.6.170.0050.03817.81
5.6.160.0070.04317.79
5.6.150.0090.04617.80
5.6.140.0060.04317.80
5.6.130.0060.04817.87
5.6.120.0020.05017.93
5.6.110.0050.04817.86
5.6.100.0060.04817.62
5.6.90.0110.04517.82
5.6.80.0020.04617.36
5.6.70.0050.04817.39
5.6.60.0050.04517.49
5.6.50.0100.03717.44
5.6.40.0040.04917.37
5.6.30.0030.05017.49
5.6.20.0090.02017.47
5.6.10.0030.02317.31
5.6.00.0030.02517.46
5.5.380.0060.04116.04
5.5.370.0030.04815.82
5.5.360.0040.03716.00
5.5.350.0110.03815.84
5.5.340.0120.03016.17
5.5.330.0070.04016.07
5.5.320.0070.04516.16
5.5.310.0070.04016.08
5.5.300.0060.04416.10
5.5.290.0100.04016.04
5.5.280.0030.04716.13
5.5.270.0070.04516.06
5.5.260.0080.04316.08
5.5.250.0050.04515.84
5.5.240.0020.04415.68
5.5.230.0080.04015.71
5.5.220.0050.04015.71
5.5.210.0100.03715.70
5.5.200.0060.04415.77
5.5.190.0060.04115.73
5.5.180.0050.03515.83
5.5.170.0000.01111.29
5.5.160.0070.02215.71
5.5.150.0040.02215.78
5.5.140.0030.02515.67
5.5.130.0030.02415.76
5.5.120.0050.02515.72
5.5.110.0050.02115.64
5.5.100.0060.02515.72
5.5.90.0050.03215.66
5.5.80.0080.02015.58
5.5.70.0070.01715.69
5.5.60.0100.01515.75
5.5.50.0060.03915.78
5.5.40.0090.03215.74
5.5.30.0080.03315.67
5.5.20.0020.04015.80
5.5.10.0050.03215.66
5.5.00.0080.01815.67
5.4.450.0030.04315.38
5.4.440.0100.03815.36
5.4.430.0070.04115.29
5.4.420.0080.04215.22
5.4.410.0100.03615.25
5.4.400.0070.02515.21
5.4.390.0010.04515.28
5.4.380.0060.04015.06
5.4.370.0030.04415.12
5.4.360.0060.03515.08
5.4.350.0070.04115.14
5.4.340.0020.02915.13
5.4.330.0090.00311.18
5.4.320.0050.01915.00
5.4.310.0080.01815.16
5.4.300.0060.02714.99
5.4.290.0050.02215.07
5.4.280.0070.02715.17
5.4.270.0050.02115.26
5.4.260.0070.02614.99
5.4.250.0000.02415.14
5.4.240.0020.02515.06
5.4.230.0060.02015.16
5.4.220.0060.02415.17
5.4.210.0030.03715.01
5.4.200.0030.02015.12
5.4.190.0070.04215.10
5.4.180.0030.02815.00
5.4.170.0090.02715.07
5.4.160.0060.02215.15
5.4.150.0030.02315.06
5.4.140.0030.02213.74
5.4.130.0060.02813.76
5.4.120.0070.02613.65
5.4.110.0070.02713.86
5.4.100.0070.01713.72
5.4.90.0050.01913.83
5.4.80.0020.02313.77
5.4.70.0020.02013.83
5.4.60.0030.02313.81
5.4.50.0050.01713.81
5.4.40.0030.02013.72
5.4.30.0050.02213.71
5.4.20.0070.02013.72
5.4.10.0070.01813.72
5.4.00.0050.01813.51
5.3.290.0060.02612.91
5.3.280.0040.02012.90
5.3.270.0050.02212.89
5.3.260.0030.03112.82
5.3.250.0030.03512.84
5.3.240.0030.02012.84
5.3.230.0020.02812.83
5.3.220.0070.03612.89
5.3.210.0090.02812.80
5.3.200.0050.02712.89
5.3.190.0060.02512.86
5.3.180.0050.02112.86
5.3.170.0060.02012.80
5.3.160.0050.03612.89
5.3.150.0020.02812.80
5.3.140.0050.02012.81
5.3.130.0020.02412.88
5.3.120.0070.01912.86
5.3.110.0020.02212.88
5.3.100.0020.02212.55
5.3.90.0020.02412.62
5.3.80.0020.02412.59
5.3.70.0060.02512.61
5.3.60.0000.02512.60
5.3.50.0050.02512.57
5.3.40.0030.02312.58
5.3.30.0020.02112.54
5.3.20.0050.03212.43
5.3.10.0030.02512.37
5.3.00.0020.02212.36
5.2.170.0000.01911.38
5.2.160.0030.01911.38
5.2.150.0010.01911.38
5.2.140.0040.01511.38
5.2.130.0030.01711.38
5.2.120.0030.01811.38
5.2.110.0020.02911.38
5.2.100.0030.01711.38
5.2.90.0080.02211.38
5.2.80.0030.01611.38
5.2.70.0040.01811.38
5.2.60.0020.02211.38
5.2.50.0050.01711.38
5.2.40.0030.02211.38
5.2.30.0000.03611.38
5.2.20.0060.03011.38
5.2.10.0000.03111.38
5.2.00.0060.03011.38
5.1.60.0030.02811.38
5.1.50.0030.03111.38
5.1.40.0020.02911.38
5.1.30.0060.03111.38
5.1.20.0080.02811.38
5.1.10.0020.02811.38
5.1.00.0050.01811.38
5.0.50.0050.02111.38
5.0.40.0020.02611.38
5.0.30.0030.01811.38
5.0.20.0010.02511.38
5.0.10.0050.02211.38
5.0.00.0030.03011.38
4.4.90.0000.01011.38
4.4.80.0020.01911.38
4.4.70.0050.01811.38
4.4.60.0030.01811.38
4.4.50.0020.01911.38
4.4.40.0050.02311.38
4.4.30.0050.01711.38
4.4.20.0050.02011.38
4.4.10.0000.02211.38
4.4.00.0030.02611.38
4.3.110.0020.01211.38
4.3.100.0030.01611.38
4.3.90.0000.02311.38
4.3.80.0000.03111.38
4.3.70.0020.01911.38
4.3.60.0010.01611.38
4.3.50.0000.02111.38
4.3.40.0020.02611.38
4.3.30.0020.01811.38
4.3.20.0020.02211.38
4.3.10.0020.01811.38
4.3.00.0020.02011.38

preferences:
46.78 ms | 400 KiB | 5 Q