3v4l.org

run code in 300+ PHP versions simultaneously
<?php $old = <<<'NOWDOC' <?php // Connect $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') OR die(mysql_error()); // Query $query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'", mysql_real_escape_string($user), mysql_real_escape_string($password)); ?> NOWDOC; echo preg_replace('/mysql_([a-zA-Z_]+)\(/', 'mysqli_$1($GLOBALS[\'link\'], ', $old);

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.18
8.3.50.0120.00522.18
8.3.40.0120.00618.91
8.3.30.0140.00018.98
8.3.20.0000.00720.21
8.3.10.0000.00921.97
8.3.00.0060.00322.32
8.2.180.0070.01316.50
8.2.170.0110.00722.96
8.2.160.0140.00020.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0120.00626.16
8.2.120.0040.00419.89
8.2.110.0090.00021.19
8.2.100.0070.00417.84
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0000.00817.87
8.2.50.0000.00818.07
8.2.40.0000.00818.34
8.2.30.0030.00618.11
8.2.20.0030.00517.72
8.2.10.0000.00819.45
8.2.00.0050.00217.78
8.1.280.0100.01025.92
8.1.270.0080.00022.05
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00421.27
8.1.230.0030.00917.54
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0070.00517.25
8.1.190.0080.00017.23
8.1.180.0090.00018.10
8.1.170.0030.00618.59
8.1.160.0030.00621.91
8.1.150.0000.00718.73
8.1.140.0040.00417.55
8.1.130.0040.00417.92
8.1.120.0000.00717.46
8.1.110.0000.00717.56
8.1.100.0000.00717.45
8.1.90.0000.00917.46
8.1.80.0050.00217.63
8.1.70.0030.00317.54
8.1.60.0050.00317.57
8.1.50.0040.00417.51
8.1.40.0030.00617.66
8.1.30.0000.00717.77
8.1.20.0000.00817.73
8.1.10.0040.00417.55
8.1.00.0040.00417.47
8.0.300.0060.00318.77
8.0.290.0040.00816.88
8.0.280.0030.00318.33
8.0.270.0000.00817.21
8.0.260.0070.00016.95
8.0.250.0030.00317.20
8.0.240.0070.00317.20
8.0.230.0070.00017.10
8.0.220.0030.00317.05
8.0.210.0030.00417.06
8.0.200.0070.00017.12
8.0.190.0040.00416.94
8.0.180.0050.00316.96
8.0.170.0030.00517.01
8.0.160.0040.00417.00
8.0.150.0030.00416.99
8.0.140.0030.00516.91
8.0.130.0000.00713.49
8.0.120.0040.00416.98
8.0.110.0000.00717.05
8.0.100.0080.00016.95
8.0.90.0080.00016.93
8.0.80.0080.00616.92
8.0.70.0040.00417.11
8.0.60.0050.00216.84
8.0.50.0000.00716.98
8.0.30.0150.00717.43
8.0.20.0080.01017.42
8.0.10.0040.00417.12
8.0.00.0150.01017.00
7.4.330.0000.00615.00
7.4.320.0000.00616.53
7.4.300.0000.00616.71
7.4.290.0040.00416.77
7.4.280.0030.00316.75
7.4.270.0000.00716.66
7.4.260.0000.00716.75
7.4.250.0040.00416.64
7.4.240.0030.00516.71
7.4.230.0030.00316.55
7.4.220.0150.00316.81
7.4.210.0110.00516.73
7.4.200.0040.00416.84
7.4.190.0000.00716.84
7.4.160.0080.00816.64
7.4.150.0060.01217.40
7.4.140.0230.01017.86
7.4.130.0080.01016.69
7.4.120.0110.00816.48
7.4.110.0070.01016.69
7.4.100.0070.01116.50
7.4.90.0100.00716.52
7.4.80.0120.00619.39
7.4.70.0100.00716.86
7.4.60.0110.00616.73
7.4.50.0070.00016.48
7.4.40.0100.00622.77
7.4.30.0130.00316.68
7.4.00.0020.01514.99
7.3.330.0050.00013.23
7.3.320.0050.00013.24
7.3.310.0070.00016.20
7.3.300.0000.00716.33
7.3.290.0030.01016.34
7.3.280.0040.01316.35
7.3.270.0120.00417.40
7.3.260.0040.01516.61
7.3.250.0140.00316.60
7.3.240.0120.00616.65
7.3.230.0110.00616.59
7.3.210.0100.00716.46
7.3.200.0120.00519.39
7.3.190.0080.00816.59
7.3.180.0070.01016.32
7.3.170.0060.01016.33
7.3.160.0070.01116.54
7.3.120.0060.01014.92
7.3.110.0060.01214.91
7.3.100.0000.01614.85
7.3.90.0030.00614.81
7.3.80.0000.00914.90
7.3.70.0030.00714.98
7.3.60.0060.01014.70
7.3.50.0060.00615.00
7.3.40.0040.01114.96
7.3.30.0040.00714.76
7.3.20.0090.00316.50
7.3.10.0100.00316.70
7.3.00.0000.01716.71
7.2.330.0110.00716.66
7.2.320.0080.00816.50
7.2.310.0100.00716.61
7.2.300.0030.01316.60
7.2.290.0140.00716.63
7.2.250.0120.00615.16
7.2.240.0060.01315.20
7.2.230.0070.00715.02
7.2.220.0040.00815.01
7.2.210.0060.00914.96
7.2.200.0040.00714.95
7.2.190.0040.00715.08
7.2.180.0060.00615.07
7.2.170.0110.00415.11
7.2.60.0090.00617.04
7.2.00.0100.00719.09
7.1.330.0030.00915.51
7.1.320.0090.00616.08
7.1.310.0070.00715.81
7.1.300.0100.00315.84
7.1.290.0090.00015.89
7.1.280.0030.00615.86
7.1.270.0040.01215.89
7.1.260.0130.00315.93
7.1.200.0040.01116.09
7.1.100.0030.00916.31
7.1.70.0000.00817.29
7.1.60.0090.01519.82
7.1.50.0090.00417.10
7.1.00.0000.08022.30
7.0.200.0060.00616.95
7.0.140.0000.07722.12
7.0.60.0130.04019.93
7.0.50.0030.06717.81
7.0.40.0070.06020.06
7.0.30.0300.07720.32
7.0.20.0300.08320.10
7.0.10.0300.07020.02
7.0.00.0130.09720.01
5.6.280.0030.07321.11
5.6.210.0100.04020.69
5.6.200.0070.05018.19
5.6.190.0100.04720.35
5.6.180.4170.04020.39
5.6.170.0230.07320.61
5.6.160.0100.08320.48
5.6.150.0200.06718.11
5.6.140.0100.07718.08
5.6.130.0100.04018.15
5.6.120.0170.07721.11
5.6.110.0070.07721.09
5.6.100.0070.07720.95
5.6.90.0030.06020.97
5.6.80.0030.08320.38
5.6.70.0170.07720.46
5.5.350.0100.07720.30
5.5.340.0130.07317.88
5.5.330.0100.05720.47
5.5.320.0270.07320.23
5.5.310.0200.05320.18
5.5.300.0070.04017.96
5.5.290.0070.08017.88
5.5.280.0070.09020.84
5.5.270.0000.06320.88
5.5.260.0130.07720.87
5.5.250.0100.06020.68
5.5.240.0170.06720.18
5.4.450.0630.05019.28
5.4.440.0800.06319.10
5.4.430.0230.04319.35
5.4.420.0230.06319.51
5.4.410.0070.05719.38
5.4.400.0070.05018.76
5.4.390.0170.04318.60
5.4.380.0400.06718.61
5.4.370.0230.05018.52
5.4.360.0100.06318.49
5.4.350.0270.04718.62
5.4.340.0170.05718.53
5.4.320.0100.03912.45
5.4.310.0050.03912.45
5.4.300.0060.03412.45
5.4.290.0080.03912.45
5.4.280.0030.04312.35
5.4.270.0030.06318.75
5.4.260.0230.05718.73
5.4.250.0170.05018.77
5.4.240.0130.06019.01
5.4.230.0170.06718.91
5.4.220.0270.06318.88
5.4.210.0070.07319.01
5.4.200.0100.06718.88
5.4.190.0170.07318.89
5.4.180.0200.06018.63
5.4.170.0170.05318.77
5.4.160.0030.07718.88
5.4.150.0200.06718.73
5.4.140.0070.06716.29
5.4.130.0230.04316.25
5.4.120.0100.05316.35
5.4.110.0070.06016.48
5.4.100.0100.06316.47
5.4.90.0100.05016.35
5.4.80.0170.05016.14
5.4.70.0100.05016.23
5.4.60.0130.07016.37
5.4.50.0100.04716.28
5.4.40.0200.05716.30
5.4.30.0200.05716.17
5.4.20.0030.08316.42
5.4.10.0230.07316.46
5.4.00.0170.08015.71
5.3.290.0060.04212.80
5.3.280.0100.07314.29
5.3.270.0130.06014.38
5.3.260.0230.04714.75
5.3.250.0100.07014.70
5.3.240.0070.07014.64
5.3.230.0200.06314.48
5.3.220.0230.05714.33
5.3.210.0200.05714.63
5.3.200.0100.06714.56
5.3.190.0170.06014.56
5.3.180.0100.06314.43
5.3.170.0070.06714.57
5.3.160.0100.08714.57
5.3.150.0200.06314.56
5.3.140.0230.05714.54
5.3.130.0200.07014.43
5.3.120.0100.09314.54
5.3.110.0130.06714.40
5.3.100.0200.05713.87
5.3.90.0200.06714.11
5.3.80.0170.06314.01
5.3.70.0170.05714.11
5.3.60.0100.05714.00
5.3.50.0100.07013.82
5.3.40.0100.05013.79
5.3.30.0100.06013.75
5.3.20.0170.05713.56
5.3.10.0200.03713.41
5.3.00.0130.06313.79
5.2.170.0070.04711.26
5.2.160.0070.06011.05
5.2.150.0030.04711.03
5.2.140.0030.06011.29
5.2.130.0170.04711.11
5.2.120.0100.04311.03
5.2.110.0100.04710.87
5.2.100.0100.03310.98
5.2.90.0070.05311.10
5.2.80.0200.03311.02
5.2.70.0070.04311.02
5.2.60.0070.04711.07
5.2.50.0100.04310.85
5.2.40.0070.04310.91
5.2.30.0030.05010.89
5.2.20.0070.06010.97
5.2.10.0170.04710.94
5.2.00.0070.04310.78
5.1.60.0030.0409.93
5.1.50.0070.0339.88
5.1.40.0170.03310.13
5.1.30.0100.04710.34
5.1.20.0130.04310.24
5.1.10.0130.03010.13
5.1.00.0070.03710.10
5.0.50.0000.0338.58
5.0.40.0070.0338.29
5.0.30.0100.0438.11
5.0.20.0100.0338.12
5.0.10.0100.0238.39
5.0.00.0100.0508.15
4.4.90.0030.0206.89
4.4.80.0100.0176.89
4.4.70.0030.0236.89
4.4.60.0070.0236.89
4.4.50.0070.0276.89
4.4.40.0000.0406.89
4.4.30.0070.0176.89
4.4.20.0070.0376.89
4.4.10.0070.0306.89
4.4.00.0030.0336.89
4.3.110.0000.0306.89
4.3.100.0000.0336.89
4.3.90.0070.0236.89
4.3.80.0070.0336.89
4.3.70.0070.0276.89
4.3.60.0000.0236.89
4.3.50.0030.0236.89
4.3.40.0100.0336.89
4.3.30.0070.0236.89
4.3.20.0070.0206.89
4.3.10.0070.0176.89
4.3.00.0170.0207.38

preferences:
47.95 ms | 401 KiB | 5 Q