3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mysql = array(); $db = mysqli_init(); $db->real_connect('localhost', 'myuser', 'mypass', 'mydb'); /* SQL Injection Example */ $_POST['username'] = chr(0xbf) . chr(0x27) . ' OR username = username /*'; $_POST['password'] = 'guess'; $mysql['username'] = addslashes($_POST['username']); $mysql['password'] = addslashes($_POST['password']); $sql = "SELECT * FROM users WHERE username = '{$mysql['username']}' AND password = '{$mysql['password']}'"; $result = $db->query($sql); if ($result->num_rows) { /* Success */ } else { /* Failure */ } ?>

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.0070.01516.63
8.3.50.0120.00921.89
8.3.40.0040.01118.59
8.3.30.0120.00418.80
8.3.20.0050.00320.16
8.3.10.0040.00423.52
8.3.00.0040.00419.56
8.2.180.0160.00318.54
8.2.170.0000.01622.96
8.2.160.0070.01120.32
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0030.00526.16
8.2.120.0060.00317.63
8.2.110.0060.00322.16
8.2.100.0090.00317.91
8.2.90.0000.00819.05
8.2.80.0030.00617.97
8.2.70.0060.00317.63
8.2.60.0080.00017.93
8.2.50.0060.00318.07
8.2.40.0040.00419.22
8.2.30.0070.00019.85
8.2.20.0000.00917.57
8.2.10.0050.00317.97
8.2.00.0060.00318.11
8.1.280.0070.00725.92
8.1.270.0080.00820.17
8.1.260.0000.00726.35
8.1.250.0030.00528.09
8.1.240.0030.00723.86
8.1.230.0070.00422.78
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0080.00018.10
8.1.170.0000.00818.32
8.1.160.0000.00721.88
8.1.150.0000.00718.83
8.1.140.0070.00417.35
8.1.130.0000.00817.69
8.1.120.0000.00717.30
8.1.110.0000.00717.36
8.1.100.0030.00617.42
8.1.90.0040.00417.32
8.1.80.0040.00417.41
8.1.70.0030.00317.44
8.1.60.0060.00317.56
8.1.50.0000.00817.59
8.1.40.0080.00017.56
8.1.30.0060.00317.66
8.1.20.0080.00017.72
8.1.10.0040.00417.49
8.1.00.0040.00417.53
8.0.300.0020.00518.77
8.0.290.0000.00716.75
8.0.280.0040.00418.30
8.0.270.0040.00417.23
8.0.260.0030.00317.24
8.0.250.0030.00316.96
8.0.240.0030.00316.86
8.0.230.0070.00016.84
8.0.220.0020.00516.80
8.0.210.0040.00416.91
8.0.200.0030.00317.03
8.0.190.0040.00417.04
8.0.180.0070.00016.88
8.0.170.0040.00416.96
8.0.160.0080.00016.91
8.0.150.0040.00416.75
8.0.140.0050.00316.80
8.0.130.0000.00613.32
8.0.120.0050.00316.87
8.0.110.0040.00416.95
8.0.100.0000.00716.88
8.0.90.0040.00416.85
8.0.80.0090.00616.89
8.0.70.0040.00416.77
8.0.60.0040.00416.73
8.0.50.0000.00716.79
8.0.30.0130.00616.90
8.0.20.0100.00817.40
8.0.10.0070.00016.96
8.0.00.0110.00716.67
7.4.330.0000.00615.08
7.4.320.0000.00616.52
7.4.300.0030.00316.51
7.4.290.0040.00416.61
7.4.280.0040.00416.58
7.4.270.0000.00716.53
7.4.260.0070.00016.46
7.4.250.0030.00316.61
7.4.240.0030.00316.55
7.4.230.0030.00316.35
7.4.220.0110.01416.41
7.4.210.0070.00716.61
7.4.200.0040.00416.52
7.4.160.0100.00716.55
7.4.150.0150.00417.40
7.4.140.0140.00417.86
7.4.130.0130.00816.45
7.4.120.0070.01316.51
7.4.110.0140.01116.46
7.4.100.0200.00316.57
7.4.90.0070.01016.46
7.4.80.0130.00619.39
7.4.70.0040.01416.67
7.4.60.0100.00716.40
7.4.50.0080.00016.52
7.4.40.0000.02016.63
7.4.30.0100.01316.76
7.4.10.0000.01615.10
7.4.00.0080.00815.00
7.3.330.0030.00313.00
7.3.320.0000.00613.14
7.3.310.0000.00716.21
7.3.300.0050.00216.13
7.3.290.0070.00716.30
7.3.280.0100.00816.27
7.3.270.0090.01317.40
7.3.260.0000.02116.61
7.3.250.0090.01116.33
7.3.240.0100.01016.39
7.3.230.0030.01316.48
7.3.210.0070.01016.23
7.3.200.0100.00716.72
7.3.190.0150.00316.61
7.3.180.0000.02116.37
7.3.170.0060.01516.50
7.3.160.0110.00916.33
7.3.130.0130.00714.78
7.3.120.0070.01014.80
7.3.110.0030.01514.67
7.3.100.0060.01014.88
7.3.90.0070.00414.82
7.3.80.0040.00914.74
7.3.70.0090.00414.74
7.3.60.0050.01014.68
7.3.50.0110.00514.64
7.3.40.0050.00814.60
7.3.30.0080.00514.72
7.3.20.0080.00916.47
7.3.10.0060.00816.64
7.3.00.0070.00816.46
7.2.330.0060.01216.43
7.2.320.0120.00916.59
7.2.310.0150.00416.50
7.2.300.0120.00416.61
7.2.290.0130.01016.52
7.2.260.0120.00614.78
7.2.250.0070.01314.67
7.2.240.0020.01514.91
7.2.230.0070.00814.83
7.2.220.0020.01014.79
7.2.210.0030.01214.74
7.2.200.0060.00814.98
7.2.190.0050.01314.98
7.2.180.0050.01214.85
7.2.170.0080.00814.74
7.2.160.0080.00814.98
7.2.150.0150.00016.82
7.2.140.0070.00716.63
7.2.130.0090.00616.80
7.2.120.0070.01116.66
7.2.110.0000.00916.67
7.2.100.0130.00316.42
7.2.90.0090.00916.78
7.2.80.0030.01316.59
7.2.70.0060.00616.76
7.2.60.0070.00716.75
7.2.50.0120.00416.79
7.2.40.0070.00816.66
7.2.30.0110.00416.74
7.2.20.0060.00916.89
7.2.10.0100.00616.85
7.2.00.0050.01118.03
7.1.330.0090.00415.48
7.1.320.0070.00415.37
7.1.310.0010.01215.47
7.1.300.0050.00815.62
7.1.290.0070.00715.68
7.1.280.0080.00715.65
7.1.270.0050.01015.62
7.1.260.0040.00915.50
7.1.250.0040.01115.71
7.1.240.0060.00615.26
7.1.230.0070.00315.53
7.1.220.0030.00715.70
7.1.210.0100.00715.81
7.1.200.0030.00915.65
7.1.190.0030.01015.61
7.1.180.0090.00615.75
7.1.170.0030.01415.44
7.1.160.0040.00415.63
7.1.150.0040.00715.51
7.1.140.0000.01415.68
7.1.130.0030.01015.49
7.1.120.0000.01315.61
7.1.110.0100.00315.76
7.1.100.0030.01016.66
7.1.90.0130.00315.70
7.1.80.0000.01615.79
7.1.70.0050.00316.07
7.1.60.0090.00717.32
7.1.50.0070.00816.23
7.1.40.0040.00415.64
7.1.30.0030.01015.62
7.1.20.0060.00315.58
7.1.10.0070.00715.32
7.1.00.0050.04119.12
7.0.330.0030.01015.35
7.0.320.0030.00915.35
7.0.310.0000.01415.42
7.0.300.0060.00615.39
7.0.290.0060.00615.05
7.0.280.0090.00015.25
7.0.270.0000.01515.06
7.0.260.0130.00315.36
7.0.250.0030.00915.32
7.0.240.0070.01015.37
7.0.230.0030.01315.34
7.0.220.0040.01215.10
7.0.210.0070.00415.09
7.0.200.0030.00916.05
7.0.190.0090.00315.45
7.0.180.0040.01115.32
7.0.170.0060.00615.42
7.0.160.0030.00715.34
7.0.150.0030.00715.36
7.0.140.0030.01015.55
7.0.130.0080.00015.13
7.0.120.0080.00415.30
7.0.110.0110.00715.46
7.0.100.0060.00615.25
7.0.90.0050.00515.04
7.0.80.0090.00615.32
7.0.70.0100.00315.25
7.0.60.0060.02417.55
7.0.50.0070.04216.61
7.0.40.0030.03316.74
7.0.30.0250.02716.76
7.0.20.0150.03516.89
7.0.10.0110.03116.78
7.0.00.0100.04016.76
5.6.400.0060.00314.11
5.6.390.0040.01114.27
5.6.380.0060.00913.98
5.6.370.0100.00314.06
5.6.360.0070.00714.00
5.6.350.0040.00814.00
5.6.340.0060.00614.42
5.6.330.0040.00714.16
5.6.320.0030.01313.72
5.6.310.0090.00614.37
5.6.300.0080.00414.21
5.6.290.0060.00613.91
5.6.280.0040.03917.56
5.6.270.0030.01313.91
5.6.260.0060.01313.96
5.6.250.0100.00714.18
5.6.240.0070.01113.96
5.6.230.0000.01414.46
5.6.220.0110.00714.34
5.6.210.0050.04817.51
5.6.200.0030.02616.12
5.6.190.0050.03017.28
5.6.180.0200.04017.34
5.6.170.0140.03117.24
5.6.160.0050.03617.38
5.6.150.0080.03516.07
5.6.140.0030.02716.20
5.6.130.0040.02616.26
5.6.120.0080.03317.70
5.6.110.0000.04817.58
5.6.100.0020.03317.57
5.6.90.0070.04817.67
5.6.80.0030.03217.21
5.6.70.1930.02817.24
5.6.60.0140.00013.79
5.6.50.0090.00014.12
5.6.40.0110.00413.93
5.6.30.0080.00614.33
5.6.20.0080.00414.18
5.6.10.0140.00013.96
5.6.00.0030.01014.18
5.5.380.0030.01214.10
5.5.370.0000.01514.09
5.5.360.0090.00614.00
5.5.350.0120.03017.38
5.5.340.0050.04415.87
5.5.330.0050.04417.16
5.5.320.0080.03017.27
5.5.310.0130.03317.22
5.5.300.0050.04015.98
5.5.290.0080.02016.11
5.5.280.0050.02217.59
5.5.270.0060.04917.34
5.5.260.0070.04817.21
5.5.250.0130.04317.37
5.5.240.0070.03217.21
5.5.230.0000.01614.03
5.5.220.0000.01213.76
5.5.210.0060.00614.02
5.5.200.0040.00814.23
5.5.190.0060.00314.08
5.5.180.0070.00713.67
5.5.170.0070.01014.18
5.5.160.0090.00313.96
5.5.150.0100.00314.29
5.5.140.0000.00913.81
5.5.130.0070.00713.74
5.5.120.0030.01014.28
5.5.110.0110.00314.00
5.5.100.0030.01014.25
5.5.90.0070.00714.05
5.5.80.0030.00614.00
5.5.70.0050.00513.94
5.5.60.0030.01014.34
5.5.50.0060.00314.00
5.5.40.0060.00914.07
5.5.30.0070.00713.82
5.5.20.0060.00713.84
5.5.10.0000.01413.78
5.5.00.0070.00313.97
5.4.450.0070.03215.37
5.4.440.0150.03015.40
5.4.430.0080.03615.28
5.4.420.0130.03015.40
5.4.410.0090.03615.41
5.4.400.0190.02515.21
5.4.390.0130.03015.13
5.4.380.0220.02215.30
5.4.370.0130.02815.16
5.4.360.0150.02815.13
5.4.350.0140.02815.23
5.4.340.0130.03015.12
5.4.330.0050.00511.32
5.4.320.0170.03015.16
5.4.310.0100.03215.27
5.4.300.0140.02915.23
5.4.290.0150.02715.23
5.4.280.0120.03015.21
5.4.270.0140.03515.14
5.4.260.0130.03215.27
5.4.250.0100.03215.25
5.4.240.0080.03015.23
5.4.230.0120.02515.30
5.4.220.0060.03215.15
5.4.210.0080.03515.15
5.4.200.0150.02915.31
5.4.190.0220.02515.06
5.4.180.0120.02815.23
5.4.170.0100.03115.25
5.4.160.0170.02515.21
5.4.150.0180.02515.05
5.4.140.0120.03013.91
5.4.130.0130.02813.91
5.4.120.0170.02313.91
5.4.110.0120.02713.90
5.4.100.0100.03013.91
5.4.90.0200.02513.91
5.4.80.0080.03113.90
5.4.70.0140.03813.89
5.4.60.0130.02213.76
5.4.50.0040.04013.82
5.4.40.0050.03513.86
5.4.30.0080.03313.89
5.4.20.0040.02713.82
5.4.10.0030.00911.32
5.4.00.0060.00311.32

preferences:
41.38 ms | 401 KiB | 5 Q