3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'qwejlj<img src =x onerror=confirm(document.cookie);lol'; $str = preg_replace('#(?:on[a-z]+|xmlns)\s*=\s*[\'"\x00-\x20]?[^\'>"]*[\'"\x00-\x20]?\s?#iu', '', $str);
Output for 4.3.0 - 7.2.0