3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySQL{ public $debugMode = 0; private $sqlHandle; private $hostname; private $username; private $password; private $dbName; private $queryHandle; function __construct() { } static function mres($value) { $search = array("\\", "\x00", "\n", "\r", "'", '"', "\x1a"); $replace = array("\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"); return str_replace($search, $replace, $value); } static function escapeContent($value) { $value = get_magic_quotes_gpc()?stripslashes($value):$value; return self::mres($value); } } print_r(array_map(array('MySQL', 'escapeContent'), array('1'',2,3))); ?>

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)
5.4.240.0330.05319.21
5.4.230.0330.07319.19
5.4.220.0370.04719.14
5.4.210.0300.03319.21
5.4.200.0270.06019.24
5.4.190.0330.05319.19
5.4.180.0200.04719.09
5.4.170.0300.07319.12
5.4.160.0270.03319.23
5.4.150.0200.04019.11
5.4.140.0230.04316.42
5.4.130.0230.04316.54
5.4.120.0270.04016.43
5.4.110.0230.03316.61
5.4.100.0270.05716.61
5.4.90.0230.03316.50
5.4.80.0230.07016.25
5.4.70.0230.03716.23
5.4.60.0230.05316.44
5.4.50.0270.06016.55
5.4.40.0230.06016.43
5.4.30.0270.07016.34
5.4.20.0300.06716.53
5.4.10.0300.04016.25
5.4.00.0170.04015.82
5.3.280.0200.06714.52
5.3.270.0270.06014.52
5.3.260.0230.04314.73
5.3.250.0230.05014.62
5.3.240.0230.04714.73
5.3.230.0330.07014.58
5.3.220.0270.05314.50
5.3.210.0200.04314.55
5.3.200.0200.07014.50
5.3.190.0370.03714.57
5.3.180.0270.07314.58
5.3.170.0230.04314.50
5.3.160.0230.04014.70
5.3.150.0300.03714.49
5.3.140.0230.07314.54
5.3.130.0230.07714.56
5.3.120.0230.05714.48
5.3.110.0330.06714.59
5.3.100.0270.05714.07
5.3.90.0270.06014.13
5.3.80.0270.03314.25
5.3.70.0230.03314.18
5.3.60.0200.04714.02
5.3.50.0200.03714.07
5.3.40.0200.07713.86
5.3.30.0230.05314.03
5.3.20.0270.07013.63
5.3.10.0270.06013.58
5.3.00.0270.03313.57

preferences:
139.99 ms | 1386 KiB | 7 Q