3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $before = $_SESSION['before']; if($before == 'http://medalwars.url.ph/'){ if($_SERVER['REQUEST_METHOD'] == 'POST'){ $username = $_POST['username']; $password = $_POST['password']; }else{ $_SESSION['foutcode'] = 'foutcode 001'; header("location: $before"); exit(); } require_once 'db_config.php'; $sql = "SELECT username, password FROM users WHERE username = '$username' AND password = '$password'"; if(!mysql_query($sql)){ $_SESSION['foutcode'] = 'foutcode 004'; header("location: $before"); exit(); } $mysqli = new mysqli($db['host'], $db['user'], $db['pass'], $db['dbname']); $result = $mysqli->query($sql); $row = $result->fetch_assoc(); if($username == htmlentities($row['username']) AND $password == htmlentities($row['password'])){ $_SESSION['logged_in'] = 'true'; $_SESSION['gebruiker'] = $username; $_SESSION['foutcode'] = 'foutcode 011'; header("location: /ingame"); exit(); }else{ $_SESSION['foutcode'] = 'foutcode 008'; header("location: $before"); exit(); } }elseif($before == 'http://medalwars.url.ph/create_account/'){ if($_SERVER['REQUEST_METHOD'] == 'POST'){ $username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $email = $_POST['e-mail']; }else{ $_SESSION['foutcode'] = 'foutcode 001'; header("location: $before"); exit(); } require_once 'db_config.php'; $ip = $_SERVER['REMOTE_ADDR']; $sql = "INSERT INTO users (username, password, ip, email) VALUES (\"$username\",\"$password\",\"$ip\",\"$email\")"; if(!mysql_query($sql)){ $_SESSION['foutcode'] = 'foutcode 004'; header("location: $before"); exit(); }else{ $mysqli = new mysqli($db['host'], $db['user'], $db['pass'], $db['dbname']); $query = mysql_query($sql, $mysqli); $_SESSION['logged_in'] = 'create'; $_SESSION['gebruiker'] = $username; $naam_verzender = 'MedalWars'; $email_verzender = 'noreply@medalwars.url.ph'; $onderwerp = 'Accountregistratie MedalWars'; $headers = "From: ".$naam_verzender." <".$email_verzender."> "; $bericht = " Beste $username, Hierbij ontvangt u de bevestiging voor het aanmaken van uw account. Uw inloggegevens zijn: Gebruikersnaam: $username. Wachtwoord: $password. Let op: u ontvangt deze gegevens eenmalig per e-mail. Als u uw wachtwoord vergeet zullen wij deze niet via e-mail verstrekken. Bewaar deze e-mail dus goed. Geef ook wijzigingen van uw e-mailadres tijdig aan onder instellingen op de website. Wij hopen dat u veel plezier zult hebben met het spelen van dit spel. mvg, Het MedalWars team - www.medalwars.url.ph "; mail($email, $onderwerp, $bericht, $headers); header("location: $before"); exit(); } }elseif($before == ''){ $_SESSION['foutcode'] = 'foutcode 009'; header("location: http://medalwars.url.ph/"); }else{ $_SESSION['foutcode'] = 'foutcode 010'; header("location: http://medalwars.url.ph/"); } ?>

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.0130.00318.87
8.3.30.0080.00818.83
8.3.20.0050.00318.85
8.3.10.0060.00320.41
8.3.00.0000.00819.50
8.2.170.0140.00722.96
8.2.160.0120.00419.20
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.12
8.2.110.0030.00621.07
8.2.100.0080.00418.16
8.2.90.0030.00619.73
8.2.80.0040.00419.60
8.2.70.0050.00317.75
8.2.60.0100.00317.55
8.2.50.0030.00618.07
8.2.40.0000.00818.34
8.2.30.0040.00418.23
8.2.20.0060.00617.97
8.2.10.0030.00517.93
8.2.00.0050.00317.84
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.50
8.1.230.0070.00421.22
8.1.220.0080.00017.91
8.1.210.0040.00419.15
8.1.200.0000.01317.35
8.1.190.0000.00817.55
8.1.180.0040.00418.10
8.1.170.0030.00719.09
8.1.160.0040.00418.96
8.1.150.0080.00018.69
8.1.140.0000.00817.63
8.1.130.0000.00717.96
8.1.120.0070.00017.62
8.1.110.0030.00517.41
8.1.100.0000.00717.60
8.1.90.0000.00817.57
8.1.80.0030.00617.41
8.1.70.0000.00717.47
8.1.60.0030.00517.68
8.1.50.0000.00817.47
8.1.40.0030.00617.61
8.1.30.0040.00417.83
8.1.20.0000.00817.80
8.1.10.0040.00417.65
8.1.00.0080.00017.41
8.0.300.0000.00920.16
8.0.290.0000.00716.88
8.0.280.0040.00418.60
8.0.270.0000.00717.43
8.0.260.0000.00716.96
8.0.250.0030.00317.16
8.0.240.0000.00817.07
8.0.230.0030.00317.10
8.0.220.0040.00416.97
8.0.210.0000.00716.96
8.0.200.0040.00417.14
8.0.190.0050.00217.19
8.0.180.0040.00417.11
8.0.170.0030.00617.02
8.0.160.0000.00716.96
8.0.150.0000.00817.01
8.0.140.0080.00016.89
8.0.130.0030.00313.50
8.0.120.0000.00817.00
8.0.110.0070.00017.09
8.0.100.0030.00517.13
8.0.90.0040.00416.92
8.0.80.0080.01017.01
8.0.70.0040.00416.94
8.0.60.0040.00416.89
8.0.50.0040.00416.86
8.0.30.0090.00917.19
8.0.20.0120.01017.18
8.0.10.0070.00016.98
8.0.00.0110.01016.83
7.4.330.0020.00213.11
7.4.320.0030.00316.63
7.4.300.0030.00316.51
7.4.290.0000.00716.66
7.4.280.0000.00916.76
7.4.270.0040.00416.68
7.4.260.0030.00313.35
7.4.250.0040.00416.71
7.4.240.0030.00316.68
7.4.230.0030.00416.46
7.4.220.0060.01216.76
7.4.210.0060.00916.57
7.4.200.0030.00316.42
7.4.190.0070.00016.89
7.4.160.0120.00616.48
7.4.150.0080.00916.55
7.4.140.0030.02216.51
7.4.130.0030.01416.49
7.4.120.0000.01816.50
7.4.110.0160.00316.63
7.4.100.0130.00316.64
7.4.90.0130.00616.60
7.4.80.0100.00719.39
7.4.70.0100.01316.74
7.4.60.0000.01616.71
7.4.50.0060.00316.66
7.4.40.0030.01316.48
7.4.30.0080.00816.73
7.4.10.0130.00615.34
7.4.00.0090.00915.17
7.3.330.0080.00013.27
7.3.320.0020.00513.18
7.3.310.0050.00316.34
7.3.300.0000.00716.43
7.3.290.0060.01016.43
7.3.280.0110.00916.47
7.3.270.0090.00916.74
7.3.260.0140.01116.77
7.3.250.0090.01116.50
7.3.240.0130.00316.52
7.3.230.0170.00016.59
7.3.210.0150.00316.48
7.3.200.0100.00716.77
7.3.190.0100.01016.60
7.3.180.0080.00916.68
7.3.170.0100.00616.48
7.3.160.0080.00816.61
7.3.130.0140.00015.18
7.3.120.0060.01014.95
7.3.110.0100.00815.04
7.3.100.0040.01014.97
7.3.90.0080.00715.17
7.3.80.0050.00614.97
7.3.70.0070.00914.96
7.3.60.0050.00715.01
7.3.50.0040.00814.95
7.3.40.0080.00714.98
7.3.30.0030.01014.78
7.3.20.0010.01316.75
7.3.10.0100.00316.79
7.3.00.0070.00716.59
7.2.330.0130.00716.58
7.2.320.0130.00316.80
7.2.310.0100.01016.83
7.2.300.0000.01716.78
7.2.290.0070.01316.79
7.2.260.0060.01315.20
7.2.250.0060.01315.19
7.2.240.0020.01515.07
7.2.230.0090.00414.84
7.2.220.0030.00915.04
7.2.210.0090.00515.30
7.2.200.0060.00814.95
7.2.190.0060.00815.21
7.2.180.0050.01015.12
7.2.170.0090.00515.03
7.2.160.0060.00914.99
7.2.150.0030.00617.02
7.2.140.0030.00716.77
7.2.130.0040.01116.90
7.2.120.0090.00616.81
7.2.110.0030.01316.98
7.2.100.0080.00816.74
7.2.90.0100.00316.98
7.2.80.0110.00716.85
7.2.70.0070.00316.91
7.2.60.0040.00416.66
7.2.50.0060.00616.95
7.2.40.0090.00616.84
7.2.30.0090.00616.96
7.2.20.0070.00716.74
7.2.10.0040.01117.02
7.2.00.0040.00918.07
7.1.330.0070.00715.79
7.1.320.0040.00915.80
7.1.310.0040.00715.72
7.1.300.0020.01015.84
7.1.290.0040.01115.74
7.1.280.0090.00415.86
7.1.270.0080.00615.69
7.1.260.0040.00715.80
7.1.250.0090.00615.58
7.1.240.0130.00316.04
7.1.230.0050.00515.85
7.1.220.0030.01015.85
7.1.210.0100.00315.66
7.1.200.0080.00615.79
7.1.190.0000.01215.88
7.1.180.0060.00915.71
7.1.170.0060.00315.80
7.1.160.0060.00615.85
7.1.150.0030.01015.75
7.1.140.0030.01415.67
7.1.130.0040.01115.82
7.1.120.0040.00715.90
7.1.110.0100.00715.76
7.1.100.0080.00416.96
7.1.90.0060.00615.75
7.1.80.0030.01015.65
7.1.70.0030.00716.26
7.1.60.0100.01117.65
7.1.50.0000.01516.33
7.1.40.0130.00315.85
7.1.30.0040.00715.67
7.1.20.0060.01015.84
7.1.10.0060.00915.79
7.1.00.0110.03319.25
7.0.330.0040.00415.51
7.0.320.0060.00615.10
7.0.310.0030.01315.36
7.0.300.0000.01315.45
7.0.290.0070.00715.33
7.0.280.0070.00715.33
7.0.270.0030.00515.11
7.0.260.0030.01015.39
7.0.250.0040.01115.39
7.0.240.0030.00615.52
7.0.230.0070.00715.07
7.0.220.0100.00315.49
7.0.210.0090.00615.36
7.0.200.0020.00915.99
7.0.190.0110.00715.49
7.0.180.0030.01415.25
7.0.170.0030.01015.51
7.0.160.0100.00015.45
7.0.150.0080.00415.40
7.0.140.0070.03918.73
7.0.130.0030.01015.49
7.0.120.0060.03518.78
7.0.110.0030.01015.38
7.0.100.0100.00715.48
7.0.90.0070.01015.34
7.0.80.0110.00315.16
7.0.70.0000.01515.63
7.0.60.0050.04117.78
7.0.50.0100.03716.61
7.0.40.0100.04015.61
7.0.30.0050.05115.62
7.0.20.0070.02815.61
7.0.10.0060.02615.61
7.0.00.0000.04615.67
5.6.400.0030.00714.47
5.6.390.0030.00614.22
5.6.380.0060.00314.57
5.6.370.0000.01514.50
5.6.360.0030.01014.24
5.6.350.0060.00914.59
5.6.340.0060.01014.35
5.6.330.0120.00314.39
5.6.320.0040.01114.79
5.6.310.0100.00614.30
5.6.300.0030.01014.45
5.6.290.0000.00914.28
5.6.280.0090.03817.71
5.6.270.0040.00814.61
5.6.260.0030.01014.51
5.6.250.0030.00714.66
5.6.240.0100.00714.32
5.6.230.0080.01114.36
5.6.220.0070.01114.22
5.6.210.0090.03017.46
5.6.200.0050.04216.39
5.6.190.0060.02616.30
5.6.180.0070.03716.40
5.6.170.0080.03716.17
5.6.160.0080.02716.33
5.6.150.0030.04216.21
5.6.140.0070.02416.33
5.6.130.0060.03116.37
5.6.120.0030.04516.23
5.6.110.0080.04516.38
5.6.100.0120.03716.33
5.6.90.0070.02816.41
5.6.80.0080.03315.97
5.6.70.0080.02615.92
5.6.60.0020.03116.13
5.6.50.0020.03816.12
5.6.40.0050.04015.92
5.6.30.0070.02416.00
5.6.20.0030.02415.83
5.6.10.0050.02415.94
5.6.00.0060.02316.00
5.5.380.0060.00314.09
5.5.370.0040.01514.29
5.5.360.0110.00414.70
5.5.350.0170.04417.51
5.5.340.0100.02516.22
5.5.330.0060.04316.15
5.5.320.0070.02716.19
5.5.310.0050.02816.09
5.5.300.0050.02716.08
5.5.290.0070.04416.03
5.5.280.0110.02016.14
5.5.270.0070.03316.18
5.5.260.0080.04215.98
5.5.250.0100.03616.16
5.5.240.0100.04015.72
5.5.230.0030.03015.86
5.5.220.0120.02215.86
5.5.210.0080.03515.79
5.5.200.0120.02215.79
5.5.190.0090.03315.91
5.5.180.0060.02115.72
5.5.170.0110.00714.38
5.5.160.0060.02715.75
5.5.150.0020.02615.93
5.5.140.0090.03115.67
5.5.130.0060.03615.61
5.5.120.0070.02915.62
5.5.110.0030.03015.76
5.5.100.0070.02415.80
5.5.90.0040.02615.80
5.5.80.0050.02815.85
5.5.70.0080.02215.73
5.5.60.0090.03515.70
5.5.50.0050.02415.79
5.5.40.0030.02215.65
5.5.30.0030.02315.55
5.5.20.0020.03415.69
5.5.10.0090.03815.57
5.5.00.0090.03915.55
5.4.450.0070.04015.32
5.4.440.0050.02815.40
5.4.430.0050.03015.29
5.4.420.0070.02515.41
5.4.410.0060.04015.31
5.4.400.0030.04615.25
5.4.390.0080.03515.32
5.4.380.0050.03815.23
5.4.370.0050.03015.27
5.4.360.0070.03515.27
5.4.350.0150.03515.27
5.4.340.0100.02315.19
5.4.330.0030.01011.43
5.4.320.0050.02115.21
5.4.310.0030.02515.28
5.4.300.0030.04315.23
5.4.290.0100.02315.28
5.4.280.0050.04515.19
5.4.270.0080.03515.21
5.4.260.0080.03615.27
5.4.250.0030.04015.12
5.4.240.0070.03815.24
5.4.230.0030.02715.12
5.4.220.0050.02515.20
5.4.210.0060.02015.31
5.4.200.0050.02015.22
5.4.190.0020.03015.22
5.4.180.0000.02915.20
5.4.170.0050.02215.21
5.4.160.0090.02215.19
5.4.150.0040.02415.22
5.4.140.0070.03713.80
5.4.130.0090.01713.81
5.4.120.0050.04013.88
5.4.110.0080.03513.84
5.4.100.0020.02213.84
5.4.90.0070.02013.93
5.4.80.0070.03013.86
5.4.70.0070.03813.90
5.4.60.0030.04113.97
5.4.50.0050.04013.93
5.4.40.0080.03613.86
5.4.30.0020.02413.95
5.4.20.0080.02813.83
5.4.10.0050.03413.85
5.4.00.0070.02713.59
5.3.290.0050.02213.10
5.3.280.0050.04513.00
5.3.270.0000.03613.00
5.3.260.0050.02012.99
5.3.250.0030.04212.99
5.3.240.0030.03513.07
5.3.230.0020.02512.99
5.3.220.0020.02513.05
5.3.210.0030.02813.00
5.3.200.0050.02013.05
5.3.190.0040.02913.01
5.3.180.0060.03312.99
5.3.170.0030.02512.92
5.3.160.0030.02712.97
5.3.150.0030.02112.99
5.3.140.0100.03712.97
5.3.130.0050.04312.97
5.3.120.0100.03812.96
5.3.110.0000.04412.97
5.3.100.0040.02512.71
5.3.90.0050.03412.64
5.3.80.0050.04012.71
5.3.70.0050.03412.61
5.3.60.0130.02112.64
5.3.50.0070.03712.68
5.3.40.0030.02312.58
5.3.30.0050.02812.57
5.3.20.0030.02712.53
5.3.10.0070.02212.45
5.3.00.0050.03912.46
5.2.170.0070.05011.16
5.2.160.0100.03710.97
5.2.150.0030.06711.12
5.2.140.0030.06711.31
5.2.130.0000.04011.11
5.2.120.0070.03310.91
5.2.110.0000.05011.11
5.2.100.0000.07011.02
5.2.90.0070.05011.09
5.2.80.0000.07011.06
5.2.70.0070.06711.07
5.2.60.0100.06011.04
5.2.50.0030.06310.93
5.2.40.0070.05711.17
5.2.30.0030.06010.98
5.2.20.0030.03711.16
5.2.10.0070.05710.97
5.2.00.0030.06010.82
5.1.60.0030.04310.12
5.1.50.0070.04710.02
5.1.40.0070.05010.07
5.1.30.0130.04310.34
5.1.20.0100.05010.45
5.1.10.0070.05710.16
5.1.00.0000.04010.16
5.0.50.0030.0308.67
5.0.40.0000.0278.45
5.0.30.0030.0538.39
5.0.20.0070.0308.39
5.0.10.0070.0438.39
5.0.00.0070.0678.39
4.4.90.0000.0238.39
4.4.80.0070.0338.39
4.4.70.0000.0178.39
4.4.60.0000.0408.39
4.4.50.0000.0378.39
4.4.40.0000.0338.39
4.4.30.0030.0308.39
4.4.20.0030.0378.39
4.4.10.0070.0338.39
4.4.00.0030.0578.39
4.3.110.0000.0408.39
4.3.100.0000.0408.39
4.3.90.0000.0238.39
4.3.80.0000.0508.39
4.3.70.0070.0308.39
4.3.60.0030.0338.39
4.3.50.0070.0278.39
4.3.40.0000.0578.39
4.3.30.0030.0308.39
4.3.20.0000.0378.39
4.3.10.0000.0378.39
4.3.00.0000.0378.39

preferences:
37.11 ms | 400 KiB | 5 Q