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');');
Output for 7.0.0 - 7.0.4
Parse error: syntax error, unexpected 'XSS' (T_STRING), expecting ',' or ')' in /in/OuGGk on line 14
Process exited with code 255.
Output for 5.5.0 - 5.5.33, 5.6.0 - 5.6.19
Parse error: syntax error, unexpected 'XSS' (T_STRING) in /in/OuGGk on line 14
Process exited with code 255.

preferences:
222.06 ms | 1395 KiB | 65 Q