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))); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /in/rWD6M:28 Stack trace: #0 [internal function]: MySQL::escapeContent('1') #1 /in/rWD6M(34): array_map(Array, Array) #2 {main} thrown in /in/rWD6M on line 28
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.99 ms | 401 KiB | 8 Q