3v4l.org

run code in 150+ 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 , $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.4.0 - 5.4.23
Parse error: syntax error, unexpected 'rue' (T_STRING), expecting ')' in /in/Bvob0 on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/Bvob0 on line 7
Process exited with code 255.