3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host= "htl-server.com"; $username = 'arenssql1'; $pwd= 'Arensi'; $db='arenssql1'; $con=mysqli_connect($host,$username,$pwd,$db) or die('Unable to connect'); if(mysqli_connect_error($con)) { echo "Failed to connect"; } $query=mysqli_query($con, "SELECT * FROM news"); if($query) { while($row-mysqli_fetch_array($query)) { $flag[] =$row; } print(json_encode($flag)); } mysqli_close(con); ?>

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.0120.00318.55
8.3.50.0140.00317.96
8.3.40.0090.00918.81
8.3.30.0090.00618.80
8.3.20.0070.00320.57
8.3.10.0080.00023.53
8.3.00.0050.00319.97
8.2.180.0040.01118.57
8.2.170.0150.00022.96
8.2.160.0070.00722.13
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00719.44
8.2.120.0040.00426.35
8.2.110.0050.00519.38
8.2.100.0120.00017.91
8.2.90.0080.00017.47
8.2.80.0050.00318.71
8.2.70.0050.00317.91
8.2.60.0000.00817.93
8.2.50.0050.00318.10
8.2.40.0080.00022.31
8.2.30.0070.00019.39
8.2.20.0070.00018.09
8.2.10.0050.00218.08
8.2.00.0030.00318.20
8.1.280.0040.01125.92
8.1.270.0040.00420.38
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0100.00019.11
8.1.230.0060.00620.87
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00817.36
8.1.190.0090.00017.52
8.1.180.0080.00018.10
8.1.170.0000.00819.03
8.1.160.0070.00018.81
8.1.150.0000.00820.20
8.1.140.0050.00217.73
8.1.130.0030.00318.91
8.1.120.0000.00717.31
8.1.110.0040.00417.33
8.1.100.0030.00517.46
8.1.90.0040.00417.40
8.1.80.0060.00317.38
8.1.70.0030.00317.43
8.1.60.0070.00417.58
8.1.50.0060.00317.57
8.1.40.0040.00417.56
8.1.30.0030.00517.57
8.1.20.0040.00417.65
8.1.10.0040.00417.63
8.1.00.0030.00517.50
8.0.300.0030.00618.77
8.0.290.0000.00716.63
8.0.280.0000.00818.48
8.0.270.0000.00717.25
8.0.260.0000.00716.80
8.0.250.0000.00716.95
8.0.240.0040.00416.88
8.0.230.0040.00416.89
8.0.220.0030.00316.83
8.0.210.0070.00016.93
8.0.200.0050.00317.03
8.0.190.0070.00016.97
8.0.180.0000.00716.84
8.0.170.0060.00316.95
8.0.160.0000.00716.88
8.0.150.0090.00316.79
8.0.140.0000.00816.79
8.0.130.0050.00013.30
8.0.120.0040.00416.86
8.0.110.0000.00716.70
8.0.100.0070.00016.97
8.0.90.0080.00016.78
8.0.80.0100.01016.96
8.0.70.0000.00716.98
8.0.60.0000.00716.87
8.0.50.0070.00016.90
8.0.30.0110.00716.92
8.0.20.0100.01017.40
8.0.10.0000.00716.89
8.0.00.0120.01216.81
7.4.330.0000.00415.55
7.4.320.0000.00716.46
7.4.300.0060.00016.47
7.4.290.0040.00416.55
7.4.280.0050.00316.48
7.4.270.0000.00716.63
7.4.260.0030.00316.50
7.4.250.0050.00316.61
7.4.240.0050.00316.62
7.4.230.0070.00016.65
7.4.220.0030.00316.70
7.4.210.0140.00316.54
7.4.200.0050.00216.74
7.4.160.0140.00316.53
7.4.150.0170.00817.40
7.4.140.0100.00817.86
7.4.130.0140.00416.43
7.4.120.0070.01116.51
7.4.110.0100.00716.61
7.4.100.0120.00916.40
7.4.90.0060.01216.58
7.4.80.0060.01319.39
7.4.70.0090.00916.43
7.4.60.0120.00316.48
7.4.50.0170.00016.41
7.4.40.0110.00716.54
7.4.00.0060.00914.88
7.3.330.0000.00613.20
7.3.320.0000.00613.15
7.3.310.0040.00416.32
7.3.300.0000.00716.27
7.3.290.0060.00016.12
7.3.280.0100.00616.36
7.3.270.0130.00317.40
7.3.260.0070.01216.30
7.3.250.0100.00916.26
7.3.240.0100.00716.50
7.3.230.0110.00616.68
7.3.210.0130.00616.25
7.3.200.0060.00916.56
7.3.190.0090.00716.50
7.3.180.0080.00816.57
7.3.170.0060.01516.27
7.3.160.0040.01216.37
7.3.10.0030.01116.63
7.3.00.0090.00316.63
7.2.330.0140.00316.49
7.2.320.0100.00716.33
7.2.310.0100.00716.45
7.2.300.0070.01316.22
7.2.290.0100.00616.48
7.2.130.0000.01416.84
7.2.120.0060.00616.86
7.2.110.0090.00616.91
7.2.100.0030.00616.86
7.2.90.0070.00716.60
7.2.80.0000.01316.78
7.2.70.0030.01016.75
7.2.60.0080.00416.54
7.2.50.0080.00816.50
7.2.40.0000.00916.84
7.2.30.0030.00916.70
7.2.20.0220.01017.18
7.2.10.0230.01017.30
7.2.00.0160.01017.36
7.1.250.0060.00615.64
7.1.200.0120.00015.49
7.1.140.0440.00716.79
7.1.130.0420.00416.65
7.1.120.0740.01616.39
7.1.110.0360.01716.28
7.1.100.0250.01215.72
7.1.90.0400.00015.92
7.1.80.0250.01315.85
7.1.70.0320.00615.15
7.1.60.0340.01033.26
7.1.50.0530.01732.80
7.1.40.0660.01032.61
7.1.30.0330.02032.45
7.1.20.0390.01032.70
7.1.10.0180.01514.38
7.1.00.0220.01314.87

preferences:
59.83 ms | 400 KiB | 5 Q