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[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.70.0070.01118.68
8.3.60.0060.01217.13
8.3.50.0130.00722.19
8.3.40.0120.00619.09
8.3.30.0080.00819.30
8.3.20.0000.00720.34
8.3.10.0050.00321.73
8.3.00.0040.00420.95
8.2.190.0100.01018.76
8.2.180.0120.00418.54
8.2.170.0000.01519.20
8.2.160.0110.00422.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0070.00719.89
8.2.110.0060.00320.44
8.2.100.0070.00418.23
8.2.90.0000.00819.60
8.2.80.0000.00818.13
8.2.70.0000.00818.00
8.2.60.0100.00018.41
8.2.50.0050.00318.07
8.2.40.0040.00718.17
8.2.30.0000.00818.36
8.2.20.0040.00418.07
8.2.10.0000.00818.28
8.2.00.0000.00818.16
8.1.280.0120.00325.92
8.1.270.0040.00419.16
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00623.92
8.1.230.0030.01019.27
8.1.220.0040.00418.03
8.1.210.0000.00818.77
8.1.200.0060.00317.61
8.1.190.0030.00617.60
8.1.180.0040.00418.10
8.1.170.0040.00418.89
8.1.160.0050.00222.14
8.1.150.0000.00819.11
8.1.140.0080.00017.77
8.1.130.0070.00017.97
8.1.120.0040.00417.82
8.1.110.0040.00417.65
8.1.100.0000.00717.85
8.1.90.0040.00417.77
8.1.80.0000.00817.77
8.1.70.0040.00417.87
8.1.60.0040.00417.86
8.1.50.0000.00817.82
8.1.40.0000.00917.72
8.1.30.0040.00417.92
8.1.20.0040.00417.87
8.1.10.0040.00417.78
8.1.00.0030.00517.75
8.0.300.0040.00418.77
8.0.290.0040.00417.13
8.0.280.0030.00518.68
8.0.270.0000.00717.36
8.0.260.0030.00317.49
8.0.250.0040.00417.23
8.0.240.0030.00317.33
8.0.230.0050.00317.22
8.0.220.0040.00417.13
8.0.210.0050.00217.29
8.0.200.0070.00017.31
8.0.190.0000.00717.26
8.0.180.0000.00717.32
8.0.170.0000.00917.25
8.0.160.0050.00217.23
8.0.150.0000.00717.25
8.0.140.0080.00017.30
8.0.130.0050.00013.76
8.0.120.0030.00517.10
8.0.110.0020.00517.29
8.0.100.0000.00717.12
8.0.90.0040.00417.12
8.0.80.0150.00917.24
8.0.70.0000.00817.14
8.0.60.0000.00717.15
8.0.50.0070.00017.23
8.0.30.0060.01417.59
8.0.20.0120.01317.45
8.0.10.0080.00017.40
8.0.00.0130.00517.17
7.4.330.0020.00215.26
7.4.320.0020.00516.71
7.4.300.0060.00016.85
7.4.290.0030.00616.92
7.4.280.0040.00416.87
7.4.270.0030.00316.75
7.4.260.0000.00716.68
7.4.250.0000.00716.85
7.4.240.0040.00416.85
7.4.230.0000.00716.88
7.4.220.0120.01816.75
7.4.210.0060.00916.98
7.4.200.0000.00816.69
7.4.160.0160.00416.88
7.4.150.0150.00417.40
7.4.140.0080.01317.86
7.4.130.0110.01016.89
7.4.120.0070.00916.77
7.4.110.0120.00816.70
7.4.100.0060.01216.82
7.4.90.0100.00716.67
7.4.80.0150.00319.39
7.4.70.0120.01216.74
7.4.60.0130.00616.77
7.4.50.0000.00816.63
7.4.40.0060.01616.98
7.4.30.0110.00616.93
7.4.00.0060.01015.43
7.3.330.0070.00013.35
7.3.320.0030.00313.35
7.3.310.0000.00716.55
7.3.300.0080.00016.57
7.3.290.0090.00816.59
7.3.280.0100.01016.56
7.3.270.0210.00017.40
7.3.260.0130.00316.81
7.3.250.0100.00816.88
7.3.240.0040.01616.67
7.3.230.0130.00716.65
7.3.210.0100.01016.79
7.3.200.0150.00919.39
7.3.190.0130.00316.73
7.3.180.0030.01316.84
7.3.170.0150.00916.85
7.3.160.0040.01216.60
7.3.120.0000.01815.07
7.3.110.0110.00714.95
7.3.100.0040.01115.16
7.3.90.0110.00014.99
7.3.80.0080.00815.01
7.3.70.0130.00715.02
7.3.60.0060.00915.24
7.3.50.0090.00315.19
7.3.40.0080.00515.06
7.3.30.0090.00615.18
7.3.20.0070.00717.02
7.3.10.0030.00716.79
7.3.00.0110.00617.09
7.2.330.0060.01216.87
7.2.320.0070.01017.02
7.2.310.0030.01317.05
7.2.300.0080.00816.76
7.2.290.0090.00916.97
7.2.250.0090.00915.65
7.2.240.0060.01315.31
7.2.230.0040.01115.59
7.2.220.0100.00315.20
7.2.210.0100.00615.47
7.2.200.0100.01015.46
7.2.190.0070.00715.51
7.2.180.0100.00715.55
7.2.170.0040.01115.30
7.2.60.0320.00316.90
7.2.00.0030.01019.49
7.1.330.0060.00615.82
7.1.320.0030.00915.73
7.1.310.0000.01415.85
7.1.300.0060.00615.91
7.1.290.0080.00616.09
7.1.280.0000.00916.04
7.1.270.0000.00915.77
7.1.260.0060.00816.13
7.1.200.0060.00316.12
7.1.100.0000.01118.19
7.1.70.0050.00217.63
7.1.60.0070.01019.46
7.1.50.0180.01534.76
7.1.00.0070.07322.31
7.0.200.0230.00415.04
7.0.140.0030.07022.01
7.0.60.0070.08320.11
7.0.50.0000.08717.89
7.0.40.0070.05720.32
7.0.30.0230.05720.39
7.0.20.0230.04720.04
7.0.10.0130.04020.30
7.0.00.0070.09320.13
5.6.280.0070.09020.96
5.6.210.0100.03720.65
5.6.200.0130.08018.23
5.6.190.0130.08320.77
5.6.180.0330.07020.45
5.6.170.0300.07320.36
5.6.160.0130.06320.48
5.6.150.0170.08018.16
5.6.140.0070.07318.24
5.6.130.0000.06018.17
5.6.120.0100.03721.19
5.6.110.0100.08721.02
5.6.100.0000.09721.17
5.6.90.0070.05321.16
5.6.80.0130.07320.44
5.5.350.0270.05320.47
5.5.340.0070.07718.00
5.5.330.0070.08320.21
5.5.320.0070.08320.18
5.5.310.0370.05720.33
5.5.300.0030.05317.98
5.5.290.0070.08317.99
5.5.280.0130.04720.70
5.5.270.0100.05020.82
5.5.260.0070.07320.90
5.5.250.0070.05020.62
5.5.240.0030.07320.30
5.4.450.0670.06019.58
5.4.440.1100.07719.64
5.4.430.0370.05319.46
5.4.420.0930.05319.48
5.4.410.1000.06019.13
5.4.400.1200.03318.94
5.4.390.1070.05318.65
5.4.380.1030.05318.67
5.4.370.1000.05318.60
5.4.360.1000.05018.72
5.4.350.0870.07018.75
5.4.340.1100.05718.60
5.4.320.0970.05318.61
5.4.310.0930.05718.70
5.4.300.0800.06018.75
5.4.290.0870.06718.73
5.4.280.0970.05018.48
5.4.270.0900.05718.61
5.4.260.1030.05018.61
5.4.250.0900.05718.75
5.4.240.0970.06318.71
5.4.230.0970.05318.54
5.4.220.0970.06318.54
5.4.210.1030.04718.77
5.4.200.0930.05316.65
5.4.190.0900.05318.60
5.4.180.1030.05018.48
5.4.170.0930.06018.52
5.4.160.1100.05718.72
5.4.150.0630.06018.70
5.4.140.0200.05316.23
5.4.130.0070.05716.34
5.4.120.0130.05016.34
5.4.110.0970.05316.26
5.4.100.1000.04316.35
5.4.90.1070.05016.19
5.4.80.1030.05016.32
5.4.70.1100.05016.09
5.4.60.1000.04016.24
5.4.50.1000.03716.06
5.4.40.0870.05316.08
5.4.30.0900.04716.06
5.4.20.0830.05716.18
5.4.10.0830.05316.04
5.4.00.0900.05315.74
5.3.290.0900.06014.78
5.3.280.0830.06014.63
5.3.270.0900.05714.64
5.3.260.0970.06014.54
5.3.250.1000.05714.59
5.3.240.1030.05314.55
5.3.230.1000.05314.67
5.3.220.1070.05714.59
5.3.210.0930.05714.58
5.3.200.1000.04714.54
5.3.190.0970.04714.52
5.3.180.0970.05714.70
5.3.170.1030.05014.63
5.3.160.1000.05014.55
5.3.150.0970.05714.63
5.3.140.1130.04714.58
5.3.130.1030.06014.63
5.3.120.0970.05314.56
5.3.110.0900.06014.59
5.3.100.0930.05713.98
5.3.90.1000.05713.97
5.3.80.0970.06013.96
5.3.70.1100.04714.17
5.3.60.0970.06013.93
5.3.50.0970.05313.90
5.3.40.1030.04713.98
5.3.30.0900.05713.94
5.3.20.1070.05013.66
5.3.10.0830.05713.67
5.3.00.0900.06013.59
5.2.170.0770.04711.10
5.2.160.0770.05011.24
5.2.150.0730.04711.13
5.2.140.0770.04011.16
5.2.130.0900.04011.30
5.2.120.0870.04011.17
5.2.110.0930.03711.18
5.2.100.1000.05711.13
5.2.90.0830.03711.15
5.2.80.0630.05011.07
5.2.70.0870.04011.10
5.2.60.0870.04011.25
5.2.50.0800.04011.02
5.2.40.0730.04011.09
5.2.30.0700.03710.98
5.2.20.0630.03711.14
5.2.10.0870.04011.01
5.2.00.0770.05010.76
5.1.60.0600.03310.05
5.1.50.0730.03310.05
5.1.40.0700.03010.00
5.1.30.0730.03310.48
5.1.20.0630.04310.44
5.1.10.0730.03010.17
5.1.00.0570.04010.17
5.0.50.0300.0308.70
5.0.40.0370.0238.52
5.0.30.0370.0408.37
5.0.20.0330.0278.35
5.0.10.0370.0278.23
5.0.00.0300.0438.28
4.4.90.0330.0206.53
4.4.80.0330.0176.53
4.4.70.0370.0176.53
4.4.60.0300.0206.53
4.4.50.0330.0206.53
4.4.40.0330.0306.53
4.4.30.0300.0236.53
4.4.20.0370.0206.53
4.4.10.0270.0236.53
4.4.00.0370.0376.53
4.3.110.0330.0236.53
4.3.100.0270.0236.53
4.3.90.0330.0206.53
4.3.80.0330.0376.53
4.3.70.0330.0176.53
4.3.60.0330.0236.53
4.3.50.0300.0236.53
4.3.40.0430.0206.53
4.3.30.0130.0236.53
4.3.20.0200.0236.53
4.3.10.0170.0236.53
4.3.00.0030.03714.47

preferences:
21.18 ms | 401 KiB | 5 Q