3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $connect = new mysqli('localhost', 'username', 'password', 'db_name'); $connect->set_charset('utf8mb4'); // always set the charset if (isset($_POST['user_name'], $_POST['user_pass']) && $_POST['user_login'] == 1) { //Assigning posted values to variables. $username = $_POST['user_name']; $password = $_POST['user_pass']; //Checking the values are existing in the database or not $stmt = $connect->prepare("SELECT user_pass FROM users WHERE user_name=?"); $stmt->bind_param('s', $username); $stmt->execute(); $result = $stmt->get_result(); $user_from_db = $result->fetch_object(); if ($user_from_db && password_verify($password, $user_from_db->user_pass)) { $_SESSION['pageadmin'] = true; $_SESSION['user_name'] = $username; } else { //If the login credentials doesn't match, he will be shown with an error message. echo "Invalid Login Credentials."; } }

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.5.10.0070.01116.71
8.5.00.0150.00720.20
8.4.150.0020.00014.05
8.4.140.0180.00317.58
8.4.130.0040.01118.16
8.4.120.0120.00722.04
8.4.110.0020.00918.87
8.4.100.0150.00617.96
8.4.90.0100.00920.38
8.4.80.0120.00718.84
8.4.70.0140.00618.10
8.4.60.0050.00418.82
8.4.50.0070.00518.57
8.4.40.0100.01018.86
8.4.30.0040.00418.46
8.4.20.0030.01720.62
8.4.10.0090.00019.60
8.3.280.0030.00014.05
8.3.270.0070.01216.57
8.3.260.0060.01316.82
8.3.250.0040.00418.71
8.3.240.0110.00916.71
8.3.230.0110.00916.42
8.3.220.0140.00418.88
8.3.210.0060.00216.79
8.3.200.0110.00916.70
8.3.190.0120.00719.14
8.3.180.0110.00718.22
8.3.170.0130.00617.05
8.3.160.0050.00320.16
8.3.150.0090.01217.07
8.3.140.0030.00617.31
8.3.130.0060.00318.28
8.3.120.0080.00018.76
8.3.110.0080.00016.41
8.3.100.0000.00916.79
8.3.90.0040.00416.68
8.3.80.0000.00917.97
8.3.70.0160.00616.61
8.3.60.0060.00918.43
8.3.50.0080.00924.49
8.3.40.0090.00619.10
8.3.30.0040.01118.79
8.3.20.0040.00422.03
8.3.10.0060.00322.15
8.3.00.0040.00422.57
8.2.290.0130.00616.56
8.2.280.0100.00918.46
8.2.270.0180.00018.86
8.2.260.0030.00616.58
8.2.250.0040.01116.57
8.2.240.0080.00318.97
8.2.230.0000.00820.94
8.2.220.0080.00024.06
8.2.210.0000.01526.77
8.2.200.0070.00316.60
8.2.190.0130.00616.88
8.2.180.0100.01016.75
8.2.170.0070.01122.96
8.2.160.0080.00619.29
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0090.00026.16
8.2.110.0090.00321.03
8.2.100.0040.00817.91
8.2.90.0040.00418.05
8.2.80.0040.00418.01
8.2.70.0050.00317.38
8.2.60.0000.00817.59
8.2.50.0030.00617.63
8.2.40.0000.00919.82
8.2.30.0030.00618.11
8.2.20.0050.00217.96
8.2.10.0030.00519.15
8.2.00.0000.00819.54
8.1.330.0090.01016.46
8.1.320.0110.00815.82
8.1.310.0110.00718.16
8.1.300.0060.00319.88
8.1.290.0080.00018.88
8.1.280.0180.00025.92
8.1.270.0030.00522.14
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.98
8.1.230.0040.00722.75
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0060.00317.25
8.1.190.0030.00617.23
8.1.180.0000.00918.10
8.1.170.0030.00517.62
8.1.160.0040.00418.87
8.1.150.0040.00418.72
8.1.140.0000.00818.80
8.1.130.0000.00720.19
8.1.120.0040.00417.27
8.1.110.0080.00017.33
8.1.100.0000.00717.28
8.1.90.0060.00317.36
8.1.80.0050.00317.39
8.1.70.0040.00417.25
8.1.60.0030.00517.38
8.1.50.0030.00517.51
8.1.40.0030.00517.56
8.1.30.0060.00317.46
8.1.20.0080.00017.64
8.1.10.0040.00417.48
8.1.00.0040.00417.35
8.0.300.0020.00519.89
8.0.290.0040.00416.88
8.0.280.0050.00318.38
8.0.270.0070.00017.94
8.0.260.0080.00021.94
8.0.250.0070.00016.98
8.0.240.0030.00316.89
8.0.230.0070.00016.98
8.0.220.0040.00416.89
8.0.210.0000.00716.97
8.0.200.0030.00317.05
8.0.190.0050.00217.02
8.0.180.0040.00416.96
8.0.170.0000.00916.95
8.0.160.0070.00017.00
8.0.150.0050.00316.83
8.0.140.0040.00416.86
8.0.130.0000.00513.38
8.0.120.0070.00016.93
8.0.110.0040.00416.98
8.0.100.0040.00416.92
8.0.90.0000.00816.96
8.0.80.0090.00616.89
8.0.70.0090.00016.93
8.0.60.0000.00716.92
8.0.50.0070.00016.88
8.0.30.0110.00617.04
8.0.20.0080.01217.03
8.0.10.0000.00716.82
8.0.00.0120.00616.85
7.4.330.0060.00015.55
7.4.320.0060.00016.53
7.4.300.0030.00316.46
7.4.290.0000.00716.45
7.4.280.0030.00616.40
7.4.270.0030.00316.40
7.4.260.0050.00013.30
7.4.250.0030.00316.44
7.4.240.0050.00216.53
7.4.230.0040.00416.68
7.4.220.0020.00516.60
7.4.210.0080.00816.52
7.4.200.0070.00016.58
7.4.130.0050.01316.62
7.4.120.0150.00916.67
7.4.110.0070.01016.43
7.4.100.0100.00716.44
7.4.90.0130.00416.48
7.4.80.0140.00719.39
7.4.70.0070.01016.38
7.4.60.0060.01016.37
7.4.50.0060.00616.36
7.4.40.0080.01416.37
7.4.30.0070.01116.25
7.4.20.0100.00916.50
7.4.10.0080.01516.45
7.4.00.0080.00816.41
7.3.330.0030.00616.31
7.3.320.0030.00313.21
7.3.310.0040.00416.32
7.3.300.0070.00016.35
7.3.290.0060.00916.32
7.3.280.0090.00616.32
7.3.260.0030.01316.66
7.3.240.0100.00716.30
7.3.230.0120.00616.42
7.3.210.0040.01416.46
7.3.200.0100.00716.51
7.3.190.0070.01116.51
7.3.180.0090.00616.41
7.3.170.0090.00916.38
7.3.160.0120.00916.26
7.3.150.0130.00316.43
7.3.140.0110.00716.48
7.3.130.0100.00916.09
7.3.120.0110.00816.50
7.3.110.0070.01116.24
7.3.100.0130.00316.36
7.3.90.0170.00716.50
7.3.80.0080.00816.47
7.3.70.0070.01316.19
7.3.60.0100.00716.13
7.3.50.0070.01416.27
7.3.40.0110.00816.23
7.3.30.0090.00916.34
7.3.20.0060.01316.40
7.3.10.0070.01016.36
7.3.00.0110.00816.25
7.2.330.0150.00616.56
7.2.320.0130.00616.57
7.2.310.0130.00316.63
7.2.300.0040.02116.27
7.2.290.0100.00616.48
7.2.280.0130.00316.53
7.2.270.0170.00816.66
7.2.260.0110.00616.66
7.2.250.0030.01316.63
7.2.240.0060.00916.32
7.2.230.0080.01116.52
7.2.220.0100.01316.42
7.2.210.0110.01316.37
7.2.200.0040.01216.52
7.2.190.0140.01016.35
7.2.180.0170.00816.29
7.2.170.0040.01416.25
7.2.160.0090.00916.45
7.2.150.0070.01016.45
7.2.140.0120.00616.42
7.2.130.0100.00616.49
7.2.120.0090.00916.67
7.2.110.0130.00316.34
7.2.100.0060.01016.41
7.2.90.0080.01016.63
7.2.80.0160.00316.47
7.2.70.0210.01216.50
7.2.60.0040.01116.35
7.2.50.0070.01016.47
7.2.40.0070.01016.54
7.2.30.0050.01416.62
7.2.20.0110.00716.46
7.2.10.0120.00616.38
7.2.00.0030.01416.46

preferences:
37.19 ms | 403 KiB | 5 Q