3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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))); ?>
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '',2,3)));' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/9fXd3 on line 34
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/9fXd3 on line 34
Process exited with code 255.