3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $clientNumber = '100'; $supportNumber = '22123322'; $countryCode = 'GB'; $db = new MySQLi('dbmaster', 'user', 'pass', 'dbname'); $existingResult = $db->query(sprintf( "SELECT `id` FROM `calls_queue` WHERE `client_number` = '%s' AND `support_number` = '%s' AND `status` = 0", $clientNumber, $supportNumber )); if ($existingResult && $existingResult->num_rows) { $call = $existingResult->fetch_assoc(); $result = $db->query(sprintf("UPDATE `calls_queue` SET `calls` = `calls` + 1 WHERE `id` = %d", $call['id'])); } else { $result = $db->query(sprintf( "INSERT INTO `calls_queue` (`client_number`, `support_number`, `country_code`, `calls`) VALUES ('%s', '%s', '%s', 1)", $clientNumber, $supportNumber, $countryCode )); }

Here you find the average performance (time & memory) of each version. A greyed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0beta10.0000.00812.55
7.3.0alpha10.0110.00012.79
7.2.60.0130.00316.88
7.2.00.0060.00618.72
7.1.200.0040.01115.66
7.1.100.0100.00317.92
7.1.70.0030.00717.07
7.1.60.0090.00919.17
7.1.50.0140.01016.77
7.1.00.0000.07322.31
7.0.200.0060.00316.56
7.0.140.0030.07021.97
7.0.120.0070.07022.09
7.0.110.0030.08019.96
7.0.100.0170.07019.95
7.0.90.0100.08019.86
7.0.80.0070.09019.95
7.0.70.0070.07719.92
7.0.60.0000.05019.89
7.0.50.0030.08019.87
7.0.40.0030.08019.75
7.0.30.0000.08019.79
7.0.20.0100.07319.73
7.0.10.0070.08319.84
7.0.00.0070.04719.81
5.6.280.0070.06720.91
5.6.260.0030.04020.67
5.6.250.0070.08020.66
5.6.240.0030.07020.63
5.6.230.0130.06720.68
5.6.220.0070.06020.70
5.6.210.0100.07320.81
5.6.200.0070.08720.61
5.6.190.0100.08020.65
5.6.180.0030.08320.47
5.6.170.0030.05720.62
5.6.160.0030.08020.59
5.6.150.0100.07020.65
5.6.140.0030.07020.55
5.6.130.0070.07720.85
5.6.120.0070.08320.60
5.6.110.0000.09020.64
5.6.100.0130.07720.60
5.6.90.0070.08020.61
5.6.80.0000.07320.07
5.6.70.0070.08020.22
5.6.60.0100.06320.07
5.6.50.0130.07019.91
5.6.40.0070.03720.00
5.6.30.0070.04719.95
5.6.20.0000.04019.97
5.6.10.0070.08320.06
5.6.00.0100.07020.04
5.5.380.0130.04317.50
5.5.370.0070.08017.52
5.5.360.0070.04717.39
5.5.350.0030.06717.43
5.5.340.0070.07018.01
5.5.330.0230.03018.09
5.5.320.0100.07318.16
5.5.310.0070.04718.16
5.5.300.0070.05718.09
5.5.290.0000.08318.19
5.5.280.0100.08017.84
5.5.270.0030.07318.09
5.5.260.0030.08717.97
5.5.250.0100.06717.93
5.5.240.0070.04317.37
5.5.230.0100.04017.40
5.5.220.0030.07717.46
5.5.210.0000.07717.14
5.5.200.0030.05717.47
5.5.190.0100.06317.51
5.5.180.0100.04017.12
5.5.160.0070.08017.45
5.5.150.0100.07317.37
5.5.140.0070.05017.46
5.5.130.0030.07317.44
5.5.120.0070.07717.33
5.5.110.0070.07017.46
5.5.100.0030.07717.41
5.5.90.0030.07717.11
5.5.80.0100.06717.26
5.5.70.0030.07717.09
5.5.60.0100.07317.34
5.5.50.0070.06717.41
5.5.40.0100.07317.08
5.5.30.0100.07017.10
5.5.20.0030.08317.09
5.5.10.0030.05717.34
5.5.00.0100.07717.36
5.4.450.0070.07319.25
5.4.440.0030.08319.40
5.4.430.0130.05019.36
5.4.420.0070.04319.44
5.4.410.0100.07719.15
5.4.400.0070.07018.95
5.4.390.0130.05719.16
5.4.380.0030.04319.02
5.4.370.0000.04318.95
5.4.360.0100.04319.00
5.4.350.0130.05718.98
5.4.340.0070.07319.10
5.4.320.0030.07718.96
5.4.310.0200.06319.12
5.4.300.0000.08019.14
5.4.290.0070.07019.02
5.4.280.0070.07718.95
5.4.270.0100.06719.24
5.4.260.0070.07318.93
5.4.250.0030.07018.97
5.4.240.0030.07019.07
5.4.230.0100.03319.00
5.4.220.0100.06719.09
5.4.210.0100.07319.11
5.4.200.0100.04319.11
5.4.190.0170.06719.12
5.4.180.0030.07319.17
5.4.170.0070.05719.00
5.4.160.0030.07319.23
5.4.150.0070.04318.91
5.4.140.0100.03716.48
5.4.130.0100.06716.26
5.4.120.0100.03716.19
5.4.110.0030.07316.29
5.4.100.0130.06316.58
5.4.90.0100.05316.52
5.4.80.0030.07716.37
5.4.70.0070.07016.49
5.4.60.0000.07316.35
5.4.50.0100.06316.26
5.4.40.0070.07716.52
5.4.30.0070.07716.49
5.4.20.0070.07716.26
5.4.10.0170.06716.29
5.4.00.0000.05715.81
5.3.290.0130.06314.61
5.3.280.0100.07314.59
5.3.270.0030.08014.55
5.3.260.0030.07714.43
5.3.250.0100.06714.66
5.3.240.0030.07014.48
5.3.230.0030.04714.60
5.3.220.0170.06014.46
5.3.210.0030.07014.63
5.3.200.0030.07714.35
5.3.190.0100.06714.56
5.3.180.0100.04314.39
5.3.170.0230.05714.62
5.3.160.0030.06714.45
5.3.150.0030.07714.50
5.3.140.0070.08714.62
5.3.130.0070.05714.33
5.3.120.0070.07314.56
5.3.110.0100.07014.41
5.3.100.0070.05314.04
5.3.90.0170.06313.87
5.3.80.0000.07714.04
5.3.70.0100.06713.84
5.3.60.0170.07013.93
5.3.50.0030.05713.87
5.3.40.0070.05713.73
5.3.30.0070.06713.84
5.3.20.0070.04013.55
5.3.10.0100.04313.59
5.3.00.0100.07313.70
5.2.170.0030.06311.93
5.2.160.0070.06311.93
5.2.150.0000.06311.93
5.2.140.0100.05711.93
5.2.130.0030.06711.93
5.2.120.0070.03311.93
5.2.110.0030.06711.93
5.2.100.0130.05011.93
5.2.90.0030.05311.93
5.2.80.0030.03011.93
5.2.70.0070.05011.93
5.2.60.0070.05711.93
5.2.50.0130.05711.93
5.2.40.0030.03311.93
5.2.30.0000.03011.93
5.2.20.0100.05711.93
5.2.10.0030.05011.93
5.2.00.0000.03311.93
5.1.60.0070.04711.93
5.1.50.0030.02711.93
5.1.40.0030.04011.93
5.1.30.0030.05711.93
5.1.20.0030.03011.93
5.1.10.0070.04711.93
5.1.00.0000.03311.93
5.0.50.0030.04311.93
5.0.40.0070.02711.93
5.0.30.0030.04011.93
5.0.20.0070.04011.93
5.0.10.0000.02311.93
5.0.00.0000.06311.93
4.4.90.0070.03311.93
4.4.80.0000.03011.93
4.4.70.0000.02711.93
4.4.60.0000.03711.93
4.4.50.0000.03711.93
4.4.40.0000.05311.93
4.4.30.0000.01711.93
4.4.20.0000.03711.93
4.4.10.0000.03311.93
4.4.00.0000.05311.93
4.3.110.0030.03311.93
4.3.100.0000.03711.93
4.3.90.0030.02311.93
4.3.80.0030.02711.93
4.3.70.0030.03311.93
4.3.60.0030.03311.93
4.3.50.0070.02311.93
4.3.40.0030.05011.93
4.3.30.0070.02711.93
4.3.20.0030.03711.93
4.3.10.0000.02011.93
4.3.00.0070.03011.93