3v4l.org

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