3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Query(){ # read params $args = func_get_args(); # replace parameter after parameter, escape (SQL injection) and non-numeric encapsule with '' for($i=1; $i < Count($args); $i++){ if(get_magic_quotes_gpc() == 0) $arg = @mysql_real_escape_string($args[$i]); else $arg = @mysql_real_escape_string(stripslashes($args[$i])); $arg = strtr($arg, array('#'=>'[hash]')); if($arg != 'NULL') $arg = (is_numeric($arg))? $arg : "'".$arg."'"; $args[0] = substr_replace($args[0], $arg, strPos($args[0], '#'),1); } $args[0] .= ';'; return $args[0]; } $id = 501; $check_sql = Query("update user_info set login_counter=login_counter+1, date_last_login=NOW() where id_twitter = #", $id); ECHO $check_sql;

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.0080.00818.55
8.3.50.0070.01022.00
8.3.40.0160.00318.85
8.3.30.0100.01019.14
8.3.20.0040.00420.34
8.3.10.0000.00820.52
8.3.00.0090.00019.38
8.2.180.0070.01016.50
8.2.170.0070.01022.96
8.2.160.0040.01120.17
8.2.150.0060.00324.18
8.2.140.0030.00724.66
8.2.130.0080.00026.16
8.2.120.0030.00622.25
8.2.110.0050.00519.30
8.2.100.0060.00617.97
8.2.90.0080.00019.08
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0040.00418.18
8.2.30.0040.00419.32
8.2.20.0080.00017.75
8.2.10.0040.00418.04
8.2.00.0040.00417.86
8.1.280.0140.01025.92
8.1.270.0000.00723.88
8.1.260.0040.00426.35
8.1.250.0110.00428.09
8.1.240.0050.00521.05
8.1.230.0040.00817.45
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.36
8.1.180.0030.00518.10
8.1.170.0040.00418.64
8.1.160.0020.00522.02
8.1.150.0040.00418.91
8.1.140.0040.00417.37
8.1.130.0000.00717.84
8.1.120.0000.00717.37
8.1.110.0040.00417.43
8.1.100.0040.00417.48
8.1.90.0000.00717.48
8.1.80.0000.00717.45
8.1.70.0000.00817.38
8.1.60.0030.00617.58
8.1.50.0050.00217.50
8.1.40.0100.00017.54
8.1.30.0080.00017.55
8.1.20.0050.00217.55
8.1.10.0040.00417.56
8.1.00.0000.00717.56
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00518.44
8.0.270.0000.00717.27
8.0.260.0000.00717.25
8.0.250.0070.00016.90
8.0.240.0080.00016.99
8.0.230.0040.00416.93
8.0.220.0030.00317.01
8.0.210.0000.00716.94
8.0.200.0030.00317.00
8.0.190.0030.00616.92
8.0.180.0050.00216.91
8.0.170.0080.00016.93
8.0.160.0000.00716.88
8.0.150.0070.00016.75
8.0.140.0000.00716.94
8.0.130.0000.00513.36
8.0.120.0050.00316.84
8.0.110.0000.00816.91
8.0.100.0000.00716.86
8.0.90.0000.00716.91
8.0.80.0200.00316.84
8.0.70.0030.00516.78
8.0.60.0040.00416.86
8.0.50.0040.00416.91
8.0.30.0100.01217.01
8.0.20.0110.01117.40
8.0.10.0000.00717.14
8.0.00.0110.00616.70
7.4.330.0020.00215.00
7.4.320.0060.00016.61
7.4.300.0030.00316.66
7.4.290.0070.00016.42
7.4.280.0030.00516.65
7.4.270.0060.00016.57
7.4.260.0060.00316.52
7.4.250.0030.00516.57
7.4.240.0040.00316.49
7.4.230.0040.00416.41
7.4.220.0100.01016.71
7.4.210.0030.01016.69
7.4.200.0050.00216.60
7.4.160.0130.00916.40
7.4.150.0070.01017.40
7.4.140.0110.01217.86
7.4.130.0130.00416.60
7.4.120.0060.01116.60
7.4.110.0070.01016.62
7.4.100.0100.01316.75
7.4.90.0100.00716.59
7.4.80.0120.00919.39
7.4.70.0070.01116.36
7.4.60.0090.00616.48
7.4.50.0000.00516.47
7.4.40.0120.00616.55
7.4.30.0090.01216.55
7.4.00.0030.01314.88
7.3.330.0030.00413.38
7.3.320.0030.00313.40
7.3.310.0000.00816.28
7.3.300.0030.00316.24
7.3.290.0090.00916.38
7.3.280.0050.01116.38
7.3.270.0090.00917.40
7.3.260.0140.00316.60
7.3.250.0110.00816.49
7.3.240.0120.00616.45
7.3.230.0060.01316.39
7.3.210.0130.00316.38
7.3.200.0060.01219.39
7.3.190.0140.00716.47
7.3.180.0130.00316.45
7.3.170.0110.00716.57
7.3.160.0090.00616.51
7.2.330.0090.00916.45
7.2.320.0100.01016.77
7.2.310.0070.01116.39
7.2.300.0150.00616.61
7.2.290.0080.00816.76
7.2.60.0030.01016.98
7.2.00.0090.00019.43
7.1.200.0060.00615.78
7.1.100.0090.00318.06
7.1.70.0040.00417.19
7.1.60.0110.01419.61
7.1.50.0200.01434.82
7.1.00.0070.07322.28
7.0.200.1560.01015.00
7.0.140.0130.06322.12
7.0.60.0000.05319.92
7.0.50.0100.08017.84
7.0.40.0100.05020.13
7.0.30.0530.04020.35
7.0.20.0330.08020.20
7.0.10.0170.04020.10
7.0.00.0070.05020.16
5.6.280.0070.07020.92
5.6.210.0030.04320.57
5.6.200.0000.06718.25
5.6.190.0030.04720.50
5.6.180.0170.04020.60
5.6.170.0270.04720.55
5.6.160.0030.09020.46
5.6.150.0130.06018.22
5.6.140.0070.04318.15
5.6.130.0000.08718.15
5.6.120.0030.04321.02
5.6.110.0130.06021.11
5.6.100.0100.08721.10
5.6.90.0070.06720.98
5.6.80.0030.08320.42
5.5.350.0030.04320.45
5.5.340.0070.08017.95
5.5.330.0100.08020.35
5.5.320.0170.04320.37
5.5.310.0230.03320.32
5.5.300.0100.08017.98
5.5.290.0030.07717.99
5.5.280.0070.08320.84
5.5.270.0100.07320.77
5.5.260.0070.09020.95
5.5.250.0070.08020.59
5.5.240.0070.05320.17
5.4.450.0230.06319.16
5.4.440.0300.07319.51
5.4.430.0330.07019.53
5.4.420.0300.04319.65
5.4.410.0370.06719.43
5.4.400.0230.03719.32
5.4.390.0230.05319.31
5.4.380.0370.06019.31
5.4.370.0270.04018.86
5.4.360.0270.04718.95
5.4.350.0230.05719.00
5.4.340.0200.04718.94
5.4.320.0230.03319.13
5.4.310.0200.06718.99
5.4.300.0230.04019.12
5.4.290.0200.07319.30
5.4.280.0230.04718.86
5.4.270.0300.05319.21
5.4.260.0270.04019.07
5.4.250.0270.03319.18
5.4.240.0170.04019.07
5.4.230.0170.04018.97
5.4.220.0230.07018.99
5.4.210.0230.06718.83
5.4.200.0300.05318.86
5.4.190.0230.06319.22
5.4.180.0230.04018.86
5.4.170.0270.03318.96
5.4.160.0270.03719.29
5.4.150.0200.04018.92
5.4.140.0200.04316.38
5.4.130.0300.05316.36
5.4.120.0230.04016.28
5.4.110.0230.03316.24
5.4.100.0230.03316.54
5.4.90.0200.03316.40
5.4.80.0230.03316.35
5.4.70.0270.03716.35
5.4.60.0270.03716.34
5.4.50.0200.03316.57
5.4.40.0230.03016.43
5.4.30.0130.04016.23
5.4.20.0270.03716.50
5.4.10.0200.03716.36
5.4.00.0200.03716.01
5.3.290.0300.08014.75
5.3.280.0270.06314.71
5.3.270.0270.03714.70
5.3.260.0230.05014.70
5.3.250.0200.03714.54
5.3.240.0200.03714.59
5.3.230.0200.04014.69
5.3.220.0200.05014.70
5.3.210.0170.04014.73
5.3.200.0270.03014.59
5.3.190.0170.04014.63
5.3.180.0270.07314.57
5.3.170.0300.03314.49
5.3.160.0170.04014.59
5.3.150.0230.03314.59
5.3.140.0170.04714.47
5.3.130.0200.03714.70
5.3.120.0230.03314.55
5.3.110.0230.04314.57
5.3.100.0230.03314.20
5.3.90.0200.05014.00
5.3.80.0170.03714.04
5.3.70.0170.04014.28
5.3.60.0230.04314.03
5.3.50.0270.04014.03
5.3.40.0270.03013.87
5.3.30.0200.04314.04
5.3.20.0170.04013.62
5.3.10.0200.05313.57
5.3.00.0170.03713.55
5.2.170.0230.02311.07
5.2.160.0230.05311.06
5.2.150.0170.03311.23
5.2.140.0230.03011.38
5.2.130.0170.03011.20
5.2.120.0230.05311.13
5.2.110.0200.04711.11
5.2.100.0230.05711.23
5.2.90.0130.03311.04
5.2.80.0230.04711.11
5.2.70.0100.03311.11
5.2.60.0170.02710.97
5.2.50.0130.03011.08
5.2.40.0200.05710.91
5.2.30.0200.02010.99
5.2.20.0130.03310.98
5.2.10.0130.03310.77
5.2.00.0200.04310.70
5.1.60.0100.02710.09
5.1.50.0100.03310.09
5.1.40.0170.0209.87
5.1.30.0100.04010.36
5.1.20.0100.03310.52
5.1.10.0130.03010.31
5.1.00.0130.02310.07
5.0.50.0070.0278.46
5.0.40.0100.0178.48
5.0.30.0100.0278.17
5.0.20.0030.0278.22
5.0.10.0070.0178.12
5.0.00.0170.0308.26
4.4.90.0070.0137.80
4.4.80.0070.0177.80
4.4.70.0030.0207.80
4.4.60.0100.0137.80
4.4.50.0070.0137.80
4.4.40.0070.0307.80
4.4.30.0070.0207.80
4.4.20.0070.0177.80
4.4.10.0100.0177.80
4.4.00.0030.0277.80
4.3.110.0070.0177.80
4.3.100.0070.0207.80
4.3.90.0070.0207.80
4.3.80.0070.0237.80
4.3.70.0070.0207.80
4.3.60.0070.0207.80
4.3.50.0030.0177.80
4.3.40.0100.0237.80
4.3.30.0070.0137.80
4.3.20.0000.0177.80
4.3.10.0000.0177.80
4.3.00.0000.0237.80

preferences:
32.6 ms | 401 KiB | 5 Q