3v4l.org

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