3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function init_vera_htmlspecialchars() { if (version_compare(PHP_VERSION, '5.4.0') >= 0) { function vera_htmlspecialchars($string, $flags = ENT_COMPAT|ENT_HTML401, $encoding = 'ISO-8869-2', $doubleEncode = t rue) { return htmlspecialchars($string, $flags, $encoding, $doubleEncode); } } elseif (version_compare(PHP_VERSION, '5.2.3') >= 0) { function vera_htmlspecialchars($string, $flags = ENT_COMPAT, $encoding = 'ISO-8869-2', $doubleEncode = t rue) { return htmlspecialchars($string, $flags, $encoding, $doubleEncode); } } else { function vera_htmlspecialchars($string, $flags = ENT_COMPAT, $encoding = 'ISO-8869-2', $doubleEncode = t rue) { return htmlspecialchars($string, $flags, $encoding); } } }; init_vera_htmlspecialchars(); for ($i=0; $i<100000; $i++) { $str = vera_htmlspecialchars('asdf&<>;\'"',ENT_QUOTES,'UTF-8'); }
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected '|', expecting ')' in /in/WPiht on line 6
Process exited with code 255.