3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'qwl=foobard47ae"style%3d"behavior%3aurl(%23default %23time2)"onbegin%3d"alert(1)"79064c5e2bb&bar=foo'; $urlencoded = urlencode($string); var_dump($urlencoded); var_dump(strip_tags($string)); var_dump(strip_tags($urlencoded));
Output for 4.3.0 - 7.1.0
string(136) "qwl%3Dfoobard47ae%22style%253d%22behavior%253aurl%28%2523default%0A%2523time2%29%22onbegin%253d%22alert%281%29%2279064c5e2bb%26bar%3Dfoo" string(100) "qwl=foobard47ae"style%3d"behavior%3aurl(%23default %23time2)"onbegin%3d"alert(1)"79064c5e2bb&bar=foo" string(136) "qwl%3Dfoobard47ae%22style%253d%22behavior%253aurl%28%2523default%0A%2523time2%29%22onbegin%253d%22alert%281%29%2279064c5e2bb%26bar%3Dfoo"