3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $QUERYSTRING = "test.eps"; do {$a = $QUERYSTRING; $QUERYSTRING = str_replace(array('..', '~', chr(0), ':', '?'), '', $QUERYSTRING); } while ($a != $QUERYSTRING); echo $QUERYSTRING . "\n"; if( (substr(strtolower($QUERYSTRING), -3) == ".ai") || (substr(strtolower($QUERYSTRING), -4) == ".eps")) { echo "allowed"; } else { echo "not allowed"; }
based on paG6o
Output for 4.3.0 - 7.1.0
test.eps allowed