3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xssfilter($inp){ $inp = html_entity_decode(urldecode($inp)); $inp = preg_replace('/!/','',$inp); if (preg_match('/script|on|xmlns|data/iu',$inp)){ while(preg_match('/script|on|xmlns|data/iu',$inp)){ $inp = preg_replace('/(script)|(on)|(xmlns)|(data)/iu','NO!',$inp); } } return $inp; } echo xssfilter("&#x26;&#x23;&#x78;&#x36;&#x41;&#x3B;&#x26;&#x23;&#x78;&#x36;&#x31;&#x3B;&#x26;&#x23;&#x78;&#x37;&#x36;&#x3B;&#x26;&#x23;&#x78;&#x36;&#x31;&#x3B;&#x26;&#x23;&#x78;&#x37;&#x33;&#x3B;&#x26;&#x23;&#x78;&#x36;&#x33;&#x3B;&#x26;&#x23;&#x78;&#x37;&#x32;&#x3B;&#x26;&#x23;&#x78;&#x36;&#x39;&#x3B;&#x26;&#x23;&#x78;&#x37;&#x30;&#x3B;&#x26;&#x23;&#x78;&#x37;&#x34;&#x3B;: alert('XSS');");

preferences:
57.21 ms | 402 KiB | 5 Q