3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $city = "Amersfoort"; /* create a prepared statement */ if ($stmt = $mysqli->prepare("SELECT * FROM `users` WHERE username=? AND password=?")) { /* bind parameters for markers */ $stmt->bind_param("ss", $username,$password); /* execute query */ $stmt->execute(); /* bind result variables */ $stmt->bind_result($result); /* fetch value */ $stmt->fetch(); if( count($result) > 0 ){ $_SESSION['authentificated'] = true; $_SESSION['username'] = $username; } /* close statement */ $stmt->close(); } /* close connection */ $mysqli->close(); ?>

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.4.130.0070.00217.75
8.4.120.0140.00620.43
8.4.110.0110.00822.36
8.4.100.0110.01017.79
8.4.90.0100.00418.95
8.4.80.0100.00717.77
8.4.70.0120.00818.09
8.4.60.0100.01419.04
8.4.50.0130.00818.64
8.4.40.0100.01019.52
8.4.30.0120.00919.34
8.4.20.0060.00320.84
8.4.10.0100.01020.82
8.3.260.0110.00816.61
8.3.250.0110.00419.01
8.3.240.0120.00816.79
8.3.230.0060.00316.62
8.3.220.0070.01116.92
8.3.210.0160.00416.42
8.3.200.0070.00216.69
8.3.190.0130.00420.63
8.3.180.0110.00816.76
8.3.170.0180.00018.84
8.3.160.0110.00716.55
8.3.150.0060.01216.95
8.3.140.0040.00417.04
8.3.130.0040.00418.51
8.3.120.0100.00018.88
8.3.110.0030.00620.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0070.00316.75
8.3.70.0110.01116.50
8.3.60.0100.00718.31
8.3.50.0080.00819.27
8.3.40.0070.01418.91
8.3.30.0060.01218.63
8.3.20.0040.00420.85
8.3.10.0070.00021.89
8.3.00.0000.00821.63
8.2.290.0120.00722.30
8.2.280.0090.01120.41
8.2.270.0150.00317.11
8.2.260.0110.00719.11
8.2.250.0080.00016.92
8.2.240.0090.00019.13
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0070.00326.77
8.2.200.0080.00416.88
8.2.190.0140.00016.58
8.2.180.0140.00016.88
8.2.170.0140.00022.96
8.2.160.0120.00320.29
8.2.150.0020.00524.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0110.00017.75
8.2.110.0060.00322.11
8.2.100.0040.00717.78
8.2.90.0040.00419.34
8.2.80.0090.00018.91
8.2.70.0060.00317.50
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0070.00318.28
8.2.30.0030.00617.97
8.2.20.0020.00517.96
8.2.10.0000.00719.45
8.2.00.0000.00718.08
8.1.330.0110.00821.95
8.1.320.0130.00616.30
8.1.310.0140.00418.36
8.1.300.0030.00618.57
8.1.290.0060.00630.84
8.1.280.0140.00425.92
8.1.270.0030.00622.13
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0040.00819.13
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0040.00418.50
8.1.160.0060.00318.76
8.1.150.0040.00418.72
8.1.140.0030.00519.04
8.1.130.0070.00020.31
8.1.120.0000.00817.38
8.1.110.0000.00817.36
8.1.100.0040.00717.42
8.1.90.0000.00817.41
8.1.80.0000.00717.44
8.1.70.0030.00317.40
8.1.60.0000.00817.52
8.1.50.0070.00317.50
8.1.40.0000.00817.53
8.1.30.0050.00317.54
8.1.20.0070.00317.52
8.1.10.0000.00917.54
8.1.00.0040.00417.53
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0080.00018.48
8.0.270.0000.00717.30
8.0.260.0060.00018.54
8.0.250.0030.00316.95
8.0.240.0080.00016.87
8.0.230.0000.00817.03
8.0.220.0080.00016.94
8.0.210.0000.00716.84
8.0.200.0020.00517.00
8.0.190.0000.01017.03
8.0.180.0000.00716.98
8.0.170.0330.01016.98
8.0.160.0000.00717.04
8.0.150.0000.01016.93
8.0.140.0000.00716.74
8.0.130.0040.00213.29
8.0.120.0000.00716.92
8.0.110.0040.00417.00
8.0.100.0040.00416.70
8.0.90.0000.00716.99
8.0.80.0070.00716.86
8.0.70.0000.00716.96
8.0.60.0040.00416.95
8.0.50.0050.00216.96
8.0.30.0110.00917.00
8.0.20.0140.00617.01
8.0.10.0000.00817.00
8.0.00.0080.01316.69
7.4.330.0000.00616.59
7.4.320.0030.00316.55
7.4.300.0000.00716.39
7.4.290.0060.00016.53
7.4.280.0040.00416.52
7.4.270.0070.00016.39
7.4.260.0040.00416.55
7.4.250.0030.00316.45
7.4.240.0070.00016.57
7.4.230.0000.00716.28
7.4.220.0030.00516.66
7.4.210.0070.00916.54
7.4.200.0020.00516.47
7.4.160.0120.00616.51
7.4.140.0150.00417.86
7.4.130.0150.00916.45
7.4.120.0230.00016.54
7.4.110.0030.01316.68
7.4.100.0060.01216.31
7.4.90.0170.00716.48
7.4.80.0130.00319.39
7.4.70.0090.00616.36
7.4.60.0030.01316.59
7.4.50.0040.01116.69
7.4.40.0060.01016.54
7.4.00.0090.00614.75
7.3.330.0020.00213.01
7.3.320.0000.00613.06
7.3.310.0030.00316.30
7.3.300.0000.00716.20
7.3.290.0070.00016.26
7.3.280.0120.00616.24
7.3.260.0100.01016.45
7.3.240.0110.00716.32
7.3.230.0070.01016.57
7.3.210.0060.01216.20
7.3.200.0080.00816.36
7.3.190.0090.01216.27
7.3.180.0130.00616.38
7.3.170.0120.00316.31
7.3.160.0000.03116.40
7.3.40.0040.01714.51
7.3.30.0120.00314.68
7.3.20.0150.00616.48
7.3.10.0030.01016.49
7.3.00.0160.00616.19
7.2.330.0100.00716.32
7.2.320.0090.00916.67
7.2.310.0170.00016.39
7.2.300.0130.00916.64
7.2.290.0120.00616.54
7.2.170.0060.01214.62
7.2.160.0080.00414.74
7.2.150.0110.00416.87
7.2.140.0040.00916.84
7.2.130.0160.00616.80
7.2.120.0070.01616.68
7.2.110.0030.00916.41
7.2.100.0090.00316.53
7.2.90.0040.00816.73
7.2.80.0110.00016.45
7.2.70.0110.01116.57
7.2.60.0000.01316.71
7.2.50.0100.01316.39
7.2.40.0060.00616.75
7.2.30.0220.00016.70
7.2.20.0100.00316.55
7.2.10.0000.01116.54
7.2.00.0090.00316.52
7.1.280.0090.01115.37
7.1.270.0100.00615.75
7.1.260.0100.00715.63
7.1.250.0100.01015.57

preferences:
131.35 ms | 403 KiB | 5 Q