3v4l.org

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