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; $new = preg_replace('/mysql_([a-zA-Z_]+)\(/', 'mysqli_$1($GLOBALS[\'link\'], ', $old); $new = str_replace('mysqli_connect($GLOBALS[\'link\'], ', 'mysqli_connect(', $new); $new = str_replace(', )', ')', $new); echo $new;

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.130.0050.00316.72
8.3.120.0080.00020.70
8.3.110.0060.00320.94
8.3.100.0000.00816.73
8.3.90.0080.00816.88
8.3.80.0040.00718.31
8.3.70.0130.00316.88
8.3.60.0100.01018.31
8.3.50.0110.00421.95
8.3.40.0060.00919.09
8.3.30.0070.00718.96
8.3.20.0000.00820.33
8.3.10.0000.00821.92
8.3.00.0040.00422.52
8.2.250.0030.00618.54
8.2.240.0080.00017.19
8.2.230.0060.00322.58
8.2.220.0030.00724.06
8.2.210.0070.00726.77
8.2.200.0040.00418.60
8.2.190.0110.01116.63
8.2.180.0120.00916.32
8.2.170.0070.00722.96
8.2.160.0040.01419.04
8.2.150.0130.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00417.63
8.2.110.0090.00020.52
8.2.100.0120.00017.91
8.2.90.0030.00518.22
8.2.80.0080.00018.03
8.2.70.0000.00817.61
8.2.60.0040.00417.93
8.2.50.0080.00518.07
8.2.40.0060.00318.22
8.2.30.0100.00018.02
8.2.20.0000.00817.77
8.2.10.0040.00419.68
8.2.00.0000.00817.80
8.1.300.0030.00620.25
8.1.290.0060.00318.88
8.1.280.0100.00325.92
8.1.270.0040.00422.28
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0080.00022.18
8.1.230.0090.00320.96
8.1.220.0080.00017.74
8.1.210.0030.00618.96
8.1.200.0060.00317.13
8.1.190.0000.00817.39
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0040.00422.01
8.1.150.0030.00518.80
8.1.140.0040.00417.52
8.1.130.0000.00717.80
8.1.120.0000.00717.50
8.1.110.0000.00917.47
8.1.100.0020.00517.45
8.1.90.0060.00317.52
8.1.80.0000.00817.59
8.1.70.0000.00717.55
8.1.60.0080.00017.68
8.1.50.0000.00717.52
8.1.40.0000.00717.69
8.1.30.0070.00017.64
8.1.20.0040.00417.70
8.1.10.0000.00817.66
8.1.00.0040.00417.53
8.0.300.0030.00620.40
8.0.290.0040.00417.29
8.0.280.0070.00018.50
8.0.270.0070.00017.17
8.0.260.0080.00017.12
8.0.250.0030.00317.08
8.0.240.0050.00317.17
8.0.230.0000.00717.09
8.0.220.0030.00317.09
8.0.210.0000.00716.95
8.0.200.0060.00017.11
8.0.190.0000.00817.18
8.0.180.0030.00317.12
8.0.170.0030.00517.11
8.0.160.0000.00817.04
8.0.150.0040.00416.99
8.0.140.0000.00716.95
8.0.130.0000.00513.48
8.0.120.0040.00417.00
8.0.110.0080.00017.09
8.0.100.0040.00416.89
8.0.90.0040.00417.01
8.0.80.0070.00917.02
8.0.70.0040.00417.00
8.0.60.0040.00416.95
8.0.50.0000.00717.07
8.0.30.0120.00717.22
8.0.20.0120.00717.40
8.0.10.0030.00617.15
8.0.00.0120.00916.97
7.4.330.0030.00315.00
7.4.320.0030.00416.77
7.4.300.0030.00316.58
7.4.290.0000.00716.57
7.4.280.0030.00316.81
7.4.270.0000.00716.75
7.4.260.0030.00516.69
7.4.250.0030.00516.75
7.4.240.0040.00416.77
7.4.230.0000.00716.78
7.4.220.0120.00616.87
7.4.210.0040.01116.76
7.4.200.0000.00816.74
7.4.190.0050.00216.84
7.4.160.0100.00616.73
7.4.150.0070.01017.40
7.4.140.0090.00817.86
7.4.130.0080.00916.51
7.4.120.0070.01516.71
7.4.110.0150.00316.77
7.4.100.0100.01516.54
7.4.90.0090.00916.68
7.4.80.0100.01019.39
7.4.70.0100.00716.79
7.4.60.0070.01016.64
7.4.50.0030.00316.41
7.4.40.0070.01022.77
7.4.30.0060.01116.58
7.4.10.0150.00415.32
7.4.00.0080.01015.23
7.3.330.0000.00513.13
7.3.320.0030.00313.26
7.3.310.0030.00316.30
7.3.300.0030.00316.40
7.3.290.0070.01016.49
7.3.280.0050.01116.42
7.3.270.0060.01017.40
7.3.260.0120.00916.37
7.3.250.0080.00916.76
7.3.240.0100.00616.41
7.3.230.0090.00916.53
7.3.210.0070.01116.58
7.3.200.0100.00719.39
7.3.190.0170.00016.58
7.3.180.0100.00616.35
7.3.170.0070.01016.80
7.3.160.0070.01016.64
7.3.130.0110.00715.10
7.3.120.0080.00714.90
7.3.110.0070.01115.22
7.3.100.0000.01514.55
7.3.90.0070.01014.60
7.3.80.0040.00815.09
7.3.70.0060.00615.02
7.3.60.0110.00414.84
7.3.50.0030.01015.02
7.3.40.0000.01414.85
7.3.30.0040.01214.64
7.3.20.0130.00316.48
7.3.10.0030.01416.83
7.3.00.0040.01116.86
7.2.330.0110.00716.60
7.2.320.0100.00716.55
7.2.310.0060.01016.73
7.2.300.0130.00316.67
7.2.290.0090.00916.86
7.2.260.0120.00615.24
7.2.250.0100.00715.23
7.2.240.0030.01015.09
7.2.230.0040.01214.83
7.2.220.0040.01115.18
7.2.210.0030.00715.27
7.2.200.0000.00914.89
7.2.190.0060.00915.20
7.2.180.0030.01014.93
7.2.170.0040.00814.82
7.2.160.0100.00615.23
7.2.150.0080.01217.27
7.2.140.0070.01017.07
7.2.130.0060.00616.77
7.2.120.0080.00816.97
7.2.110.0090.01116.61
7.2.100.0090.00616.89
7.2.90.0040.01116.97
7.2.80.0100.00317.05
7.2.70.0060.01317.02
7.2.60.0080.00917.04
7.2.50.0090.00617.11
7.2.40.0060.00617.14
7.2.30.0060.00917.07
7.2.20.0030.01017.21
7.2.10.0030.00917.09
7.2.00.0050.00518.10
7.1.330.0000.00915.93
7.1.320.0100.00715.75
7.1.310.0030.01315.85
7.1.300.0070.00715.85
7.1.290.0040.01215.72
7.1.280.0040.01116.14
7.1.270.0060.00615.94
7.1.260.0030.01315.91
7.1.250.0030.01016.11
7.1.240.0000.01815.91
7.1.230.0070.00715.85
7.1.220.0040.00916.09
7.1.210.0030.01016.01
7.1.200.0080.00915.94
7.1.190.0070.00315.85
7.1.180.0110.00315.73
7.1.170.0000.00815.89
7.1.160.0060.00915.70
7.1.150.0060.00316.03
7.1.140.0030.00615.77
7.1.130.0040.00715.76
7.1.120.0060.00615.90
7.1.110.0050.00516.07
7.1.100.0020.00717.26
7.1.90.0000.00915.98
7.1.80.0000.01416.02
7.1.70.0050.00316.44
7.1.60.0060.01017.79
7.1.50.0080.01116.52
7.1.40.0040.01116.11
7.1.30.0070.00715.69
7.1.20.0000.01016.02
7.1.10.0030.01016.03
7.1.00.0000.04719.25
7.0.330.0000.01315.34
7.0.320.0030.00915.41
7.0.310.0030.00715.57
7.0.300.0110.00015.54
7.0.290.0130.00015.62
7.0.280.0120.00615.47
7.0.270.0030.00515.71
7.0.260.0060.00615.51
7.0.250.0140.00015.89
7.0.240.0080.00015.62
7.0.230.0070.00715.43
7.0.220.0030.00915.61
7.0.210.0110.00015.47
7.0.200.0030.01016.35
7.0.190.0070.00415.45
7.0.180.0050.00515.68
7.0.170.0090.00315.66
7.0.160.0090.00015.52
7.0.150.0030.01315.51
7.0.140.0050.04118.93
7.0.130.0040.00415.60
7.0.120.0080.00315.74
7.0.110.0000.00915.57
7.0.100.0100.00715.66
7.0.90.0090.00615.52
7.0.80.0030.00715.70
7.0.70.0030.03217.84
7.0.60.0080.04517.76
7.0.50.0050.04017.97
7.0.40.0060.04316.79
7.0.30.0020.04516.98
7.0.20.0080.04416.71
7.0.10.0080.04216.77
7.0.00.0080.04416.86
5.6.400.0030.01414.14
5.6.390.0060.00913.90
5.6.380.0040.00414.66
5.6.370.0090.00314.41
5.6.360.0030.00614.52
5.6.350.0040.00714.34
5.6.340.0030.00614.13
5.6.330.0040.00714.59
5.6.320.0070.00714.61
5.6.310.0070.00714.18
5.6.300.0030.00714.25
5.6.290.0130.00014.48
5.6.280.0030.03817.70
5.6.270.0060.01214.24
5.6.260.0030.01214.41
5.6.250.0000.01714.20
5.6.240.0040.01514.52
5.6.230.0060.00614.17
5.6.220.0070.04217.38
5.6.210.0100.03217.49
5.6.200.0010.03917.63
5.6.190.0070.04817.61
5.6.180.0070.04717.68
5.6.170.0100.04417.53
5.6.160.0070.04517.79
5.6.150.0070.04317.58
5.6.140.0050.03317.77
5.6.130.0080.04317.60
5.6.120.0050.03517.63
5.6.110.0190.02617.66
5.6.100.0030.03917.59
5.6.90.0080.03217.54
5.6.80.0060.02817.30
5.6.70.0050.04517.46
5.6.60.0060.04817.32
5.6.50.0050.04717.39
5.6.40.0070.04817.42
5.6.30.0100.03817.39
5.6.20.0050.04417.51
5.6.10.0050.03017.18
5.6.00.0020.04417.36
5.5.380.0000.01614.42
5.5.370.0070.00714.19
5.5.360.0090.04117.35
5.5.350.0050.04117.40
5.5.340.0060.02617.62
5.5.330.0050.04817.51
5.5.320.0100.04617.51
5.5.310.0010.03117.47
5.5.300.0030.03617.50
5.5.290.0080.04217.54
5.5.280.0100.03517.43
5.5.270.0110.04217.44
5.5.260.0150.04517.60
5.5.250.0060.04017.31
5.5.240.0050.04717.25
5.5.230.0130.04117.22
5.5.220.0050.04617.05
5.5.210.0020.04617.23
5.5.200.0050.04317.16
5.5.190.0060.02917.25
5.5.180.0060.03516.96
5.5.170.0030.01014.13
5.5.160.0030.03517.09
5.5.150.0080.04516.93
5.5.140.0120.04017.01
5.5.130.0020.02817.28
5.5.120.0100.04017.04
5.5.110.0080.02617.25
5.5.100.0050.04017.10
5.5.90.0080.03517.14
5.5.80.0050.04317.13
5.5.70.0020.02717.05
5.5.60.0000.03716.96
5.5.50.0050.03017.16
5.5.40.0050.03517.11
5.5.30.0020.04717.02
5.5.20.0030.04617.10
5.5.10.0100.02617.12
5.5.00.0070.03917.01
5.4.450.0070.04315.71
5.4.440.0050.03615.72
5.4.430.0040.03815.63
5.4.420.0030.04515.79
5.4.410.0100.02215.55
5.4.400.0120.03015.68
5.4.390.0090.01815.62
5.4.380.0090.03515.58
5.4.370.0090.03815.48
5.4.360.0080.02515.45
5.4.350.0070.03815.47
5.4.340.0050.03815.54
5.4.330.0000.00712.13
5.4.320.0030.04315.47
5.4.310.0050.04015.58
5.4.300.0050.02815.51
5.4.290.0060.03015.63
5.4.280.0020.02715.51
5.4.270.0050.04315.54
5.4.260.0070.03415.57
5.4.250.0030.02915.45
5.4.240.0030.03115.51
5.4.230.0050.02615.51
5.4.220.0050.03215.62
5.4.210.0080.04015.62
5.4.200.0050.02815.62
5.4.190.0050.04015.58
5.4.180.0030.02815.46
5.4.170.0070.04015.62
5.4.160.0090.03515.59
5.4.150.0050.02215.58
5.4.140.0050.03014.20
5.4.130.0020.04214.20
5.4.120.0070.03814.25
5.4.110.0100.03714.25
5.4.100.0080.02814.19
5.4.90.0040.04014.17
5.4.80.0050.03514.26
5.4.70.0050.04214.22
5.4.60.0060.03814.18
5.4.50.0030.04114.16
5.4.40.0020.04214.29
5.4.30.0080.03814.19
5.4.20.0050.03914.20
5.4.10.0040.04014.21
5.4.00.0030.04413.91
5.3.290.0050.04413.32
5.3.280.0060.01813.29
5.3.270.0030.02613.34
5.3.260.0020.03113.29
5.3.250.0030.02513.27
5.3.240.0030.02713.34
5.3.230.0050.03013.34
5.3.220.0130.03113.28
5.3.210.0020.04513.31
5.3.200.0060.04113.27
5.3.190.0090.03713.34
5.3.180.0050.03913.35
5.3.170.0050.02613.25
5.3.160.0010.03813.34
5.3.150.0060.03613.32
5.3.140.0050.02613.27
5.3.130.0050.03813.33
5.3.120.0000.04513.27
5.3.110.0130.03313.33
5.3.100.0050.02913.07
5.3.90.0000.04113.05
5.3.80.0050.03613.03
5.3.70.0070.04013.06
5.3.60.0020.04213.07
5.3.50.0010.03112.91
5.3.40.0040.04012.96
5.3.30.0050.03712.95
5.3.20.0050.03012.89
5.3.10.0020.03912.77
5.3.00.0050.04212.86
5.2.170.0000.07012.25
5.2.160.0070.03712.25
5.2.150.0030.05012.25
5.2.140.0100.06012.25
5.2.130.0030.06312.25
5.2.120.0000.07012.25
5.2.110.0130.05312.25
5.2.100.0100.05012.25
5.2.90.0070.05312.25
5.2.80.0070.05312.25
5.2.70.0070.06012.25
5.2.60.0100.03712.25
5.2.50.0000.05012.25
5.2.40.0030.04712.25
5.2.30.0100.05312.25
5.2.20.0070.05712.25
5.2.10.0070.04312.25
5.2.00.0030.06712.25
5.1.60.0030.04712.25
5.1.50.0030.05012.25
5.1.40.0030.04312.25
5.1.30.0070.05712.25
5.1.20.0030.05712.25
5.1.10.0030.06012.25
5.1.00.0030.05712.25
5.0.50.0000.05012.25
5.0.40.0030.04312.25
5.0.30.0030.06312.25
5.0.20.0130.03712.25
5.0.10.0000.04312.25
5.0.00.0030.06312.25
4.4.90.0000.02312.25
4.4.80.0000.02712.25
4.4.70.0030.02012.25
4.4.60.0000.02012.25
4.4.50.0000.03712.25
4.4.40.0070.05012.25
4.4.30.0030.03312.25
4.4.20.0100.02312.25
4.4.10.0070.03012.25
4.4.00.0030.05312.25
4.3.110.0000.03712.25
4.3.100.0030.03312.25
4.3.90.0030.03312.25
4.3.80.0000.03712.25
4.3.70.0030.03012.25
4.3.60.0000.03712.25
4.3.50.0000.02312.25
4.3.40.0070.04712.25
4.3.30.0000.02312.25
4.3.20.0030.02712.25
4.3.10.0000.02312.25
4.3.00.0030.03312.25

preferences:
31.26 ms | 403 KiB | 5 Q