3v4l.org

run code in 300+ PHP versions simultaneously
<?php // startar sessionen setlocale(LC_ALL, 'pt_BR.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($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"; } } ?> <?php session_start(); // username and password $anvandarID = "addialetobi"; $losenord = "ad@bi"; if (isset($_POST["anvandarID"]) && isset($_POST["losenord"])) { if ($_POST["anvandarID"] === $anvandarID && $_POST["losenord"] === $losenord) { $_SESSION["inloggning"] = true; header("Location: index.php?cliente=poli&data=". $datestring); exit; } // wrong login - message else {$felmeddelande = "Du har angivit fel användarnamn eller lösenord!";} } ?>

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.01117.13
8.3.50.0160.00622.13
8.3.40.0120.00319.54
8.3.30.0110.00719.85
8.3.20.0040.00420.68
8.3.10.0080.00022.46
8.3.00.0040.00421.28
8.2.180.0160.00618.91
8.2.170.0110.00722.96
8.2.160.0110.00422.58
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0160.00020.04
8.2.110.0040.00421.16
8.2.100.0030.01118.84
8.2.90.0050.00319.98
8.2.80.0050.00518.13
8.2.70.0030.00718.38
8.2.60.0150.00418.68
8.2.50.0080.00018.38
8.2.40.0110.00718.80
8.2.30.0070.00018.62
8.2.20.0000.00818.43
8.2.10.0080.00018.66
8.2.00.0070.00018.47
8.1.280.0110.00725.92
8.1.270.0080.00019.57
8.1.260.0030.00626.35
8.1.250.0110.00428.09
8.1.240.0040.00724.22
8.1.230.0060.00619.58
8.1.220.0040.00418.28
8.1.210.0020.00718.77
8.1.200.0070.00318.11
8.1.190.0030.00517.85
8.1.180.0000.00818.15
8.1.170.0000.00819.28
8.1.160.0000.00722.49
8.1.150.0090.00619.46
8.1.140.0040.00418.10
8.1.130.0040.00418.48
8.1.120.0020.00518.12
8.1.110.0000.00718.18
8.1.100.0000.00918.20
8.1.90.0040.00418.24
8.1.80.0050.00218.23
8.1.70.0070.00018.20
8.1.60.0120.00018.27
8.1.50.0110.00318.22
8.1.40.0090.00618.03
8.1.30.0000.00818.29
8.1.20.0040.00418.38
8.1.10.0000.00918.18
8.1.00.0110.00418.20
8.0.300.0040.00418.77
8.0.290.0000.00717.63
8.0.280.0060.00319.09
8.0.270.0040.00417.84
8.0.260.0000.00717.93
8.0.250.0030.00317.80
8.0.240.0000.00817.61
8.0.230.0000.00717.84
8.0.220.0000.00717.80
8.0.210.0000.00717.66
8.0.200.0000.00717.75
8.0.190.0040.00417.80
8.0.180.0130.00617.79
8.0.170.0030.00617.77
8.0.160.0030.00517.76
8.0.150.0050.00317.62
8.0.140.0160.00317.62
8.0.130.0000.00914.07
8.0.120.0040.00417.71
8.0.110.0030.00517.61
8.0.100.0050.00317.67
8.0.90.0080.00017.63
8.0.80.0100.01317.72
8.0.70.0060.00317.66
8.0.60.0040.00417.68
8.0.50.0080.00017.59
8.0.30.0190.01118.03
8.0.20.0250.00217.87
8.0.10.0000.00817.70
8.0.00.0150.00517.48
7.4.330.0090.00215.61
7.4.320.0030.00317.39
7.4.300.0070.00017.25
7.4.290.0070.01117.24
7.4.280.0150.00617.31
7.4.270.0000.00817.26
7.4.260.0000.00717.25
7.4.250.0000.00817.09
7.4.240.0040.00417.35
7.4.230.0000.00717.31
7.4.220.0290.00717.23
7.4.210.0040.01517.32
7.4.200.0050.00217.24
7.4.160.0120.00817.33
7.4.150.0170.00317.40
7.4.140.0100.01317.86
7.4.130.0200.01117.21
7.4.120.0100.00817.46
7.4.110.0150.00617.33
7.4.100.0150.00817.09
7.4.90.0070.01017.22
7.4.80.0000.01719.39
7.4.70.0070.01317.38
7.4.60.0100.00717.28
7.4.50.0060.00317.14
7.4.40.0070.01017.47
7.4.30.0090.01217.18
7.4.00.0030.01315.39
7.3.330.0040.00413.94
7.3.320.0090.00013.93
7.3.310.0000.00716.82
7.3.300.0070.00017.00
7.3.290.0090.00616.94
7.3.280.0130.01216.97
7.3.270.0160.01017.40
7.3.260.0140.00717.14
7.3.250.0060.01517.29
7.3.240.0140.00317.12
7.3.230.0090.01517.16
7.3.210.0030.01517.09
7.3.200.0180.00619.39
7.3.190.0100.00717.30
7.3.180.0130.00617.01
7.3.170.0150.00917.27
7.3.160.0030.01317.34
7.2.330.0060.01217.24
7.2.320.0100.00717.52
7.2.310.0060.01117.59
7.2.300.0110.00817.34
7.2.290.0090.00917.23
7.2.60.0100.00617.05
7.2.00.0060.00619.43
7.1.100.0030.00918.45
7.1.70.0050.00317.59
7.1.60.0090.01219.46
7.1.50.0100.01317.34
7.1.00.0070.07322.43
7.0.200.0230.00315.25
7.0.140.0100.02722.07
7.0.60.0130.07320.03
7.0.50.0070.08317.91
7.0.40.0130.09020.03
7.0.30.0300.06720.04
7.0.20.0330.07720.00
7.0.10.0100.03720.04
7.0.00.0130.08020.20
5.6.280.0030.09020.87
5.6.210.0170.07320.71
5.6.200.0030.05318.26
5.6.190.0070.08020.69
5.6.180.0300.07320.57
5.6.170.0300.06720.72
5.6.160.0100.04020.62
5.6.150.0100.05018.20
5.6.140.0030.07318.11
5.6.130.0130.08318.20
5.6.120.0070.04721.24
5.6.110.0000.06321.18
5.6.100.0070.04321.07
5.6.90.0170.08021.02
5.6.80.0200.06720.54
5.5.350.0330.07320.48
5.5.340.0130.08318.02
5.5.330.0070.04320.29
5.5.320.0070.08020.28
5.5.310.0270.06720.40
5.5.300.0130.05317.98
5.5.290.0100.08017.97
5.5.280.0100.05021.01
5.5.270.0070.08020.91
5.5.260.0070.08720.91
5.5.250.0030.05720.59
5.5.240.0070.06320.41
5.4.450.0570.06319.59
5.4.440.0730.05719.55
5.4.430.0700.06719.27
5.4.420.0900.06019.41
5.4.410.0970.04719.32
5.4.400.0970.04718.95
5.4.390.1300.04318.76
5.4.380.0930.06018.50
5.4.370.1030.05718.54
5.4.360.0930.06018.73
5.4.350.1170.06018.68
5.4.340.1170.06018.75
5.4.320.1200.07718.73
5.4.310.1130.06318.75
5.4.300.1030.05318.72
5.4.290.1000.05018.64
5.4.280.1130.06718.64
5.4.270.1070.06318.54
5.4.260.1030.05718.71
5.4.250.0900.06018.67
5.4.240.0870.07018.75
5.4.230.0870.05318.52
5.4.220.1070.05018.61
5.4.210.0930.05018.59
5.4.200.1070.04716.70
5.4.190.1000.06318.48
5.4.180.1070.04718.54
5.4.170.0970.05318.55
5.4.160.0930.05318.71
5.4.150.0970.05718.56
5.4.140.0970.06016.10
5.4.130.0970.05316.15
5.4.120.1100.04316.31
5.4.110.1030.04716.32
5.4.100.1130.05716.20
5.4.90.0970.05716.19
5.4.80.0970.05016.11
5.4.70.0970.05316.39
5.4.60.0970.04716.40
5.4.50.0930.05316.24
5.4.40.1130.04316.05
5.4.30.1070.06716.18
5.4.20.1070.05016.28
5.4.10.1030.05016.31
5.4.00.1100.05015.58
5.3.290.1030.05314.66
5.3.280.0970.06314.55
5.3.270.1000.06014.59
5.3.260.1030.06314.57
5.3.250.1030.05714.75
5.3.240.1100.05314.65
5.3.230.1230.05014.54
5.3.220.1170.05314.54
5.3.210.0930.06314.55
5.3.200.0970.06014.53
5.3.190.0930.06014.59
5.3.180.1000.06014.66
5.3.170.1070.05014.52
5.3.160.0970.05314.57
5.3.150.1300.09014.64
5.3.140.1100.04714.60
5.3.130.1130.04714.58
5.3.120.1000.05714.70
5.3.110.1030.05314.56
5.3.100.1070.04714.16
5.3.90.1100.04713.98
5.3.80.1000.05014.04
5.3.70.1130.04314.06
5.3.60.1000.05714.10
5.3.50.1000.06313.99
5.3.40.1030.06313.97
5.3.30.0930.05714.03
5.3.20.0830.05313.73
5.3.10.0600.06713.65
5.3.00.0670.05313.77
5.2.170.0800.03711.06
5.2.160.0600.04311.33
5.2.150.0400.04311.25
5.2.140.0630.05011.21
5.2.130.0770.03711.18
5.2.120.1030.04011.11
5.2.110.0800.04011.09
5.2.100.0630.04311.08
5.2.90.0570.04011.21
5.2.80.0900.04311.09
5.2.70.0830.04011.12
5.2.60.0930.05711.21
5.2.50.0730.06011.10
5.2.40.0730.05311.02
5.2.30.0930.04311.00
5.2.20.0500.04011.07
5.2.10.0470.04710.88
5.2.00.0700.05310.72
5.1.60.0800.05310.06
5.1.50.0530.03010.01
5.1.40.0530.04710.09
5.1.30.0670.03310.41
5.1.20.0570.04010.42
5.1.10.0770.04010.23
5.1.00.0300.04010.11
5.0.50.0330.0238.75
5.0.40.0330.0278.60
5.0.30.0330.0478.32
5.0.20.0470.0278.36
5.0.10.0370.0338.27
5.0.00.0400.0478.32
4.4.90.0200.0276.62
4.4.80.0300.0236.62
4.4.70.0270.0206.62
4.4.60.0170.0276.62
4.4.50.0270.0306.62
4.4.40.0270.0376.62
4.4.30.0430.0136.62
4.4.20.0300.0236.62
4.4.10.0430.0206.62
4.4.00.0370.0406.62
4.3.110.0270.0336.62
4.3.100.0370.0236.62
4.3.90.0270.0236.62
4.3.80.0330.0476.62
4.3.70.0370.0236.62
4.3.60.0200.0236.62
4.3.50.0330.0276.62
4.3.40.0270.0376.62
4.3.30.0170.0306.62
4.3.20.0130.0236.62
4.3.10.0200.0276.62
4.3.00.0070.01714.47

preferences:
39.85 ms | 401 KiB | 5 Q