3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // remove any odd characters from string $match_list = "\x{20}-\x{5f}\x{61}-\x{7e}"; // basic ascii chars excluding backtick $match_list .= "\x{a1}-\x{ff}"; // extended latin 1 chars excluding control chars $match_list .= "\x{20ac}\x{201c}\x{201d}"; // euro symbol & left/right double quotation mark (from Word) $match_list .= "\x{2018}\x{2019}"; // left/right single quotation mark (from word) $cleaned_line = preg_replace("/[^$match_list]/u", "รณ", $linein); var_dump($linein)
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected end of file in /in/SSRD7 on line 11
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected $end in /in/SSRD7:11 Stack trace: #0 {main}
Process exited with code 255.