3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $QUERYSTRING = "test.php?.eps"; $changed = -1; do {$a = $QUERYSTRING; $QUERYSTRING = str_replace(array('..', '~', chr(0), ':', '?'), '', $QUERYSTRING); $changed++; } while ($a != $QUERYSTRING); echo $QUERYSTRING . "\n"; if($changess === 0 && (substr(strtolower($QUERYSTRING), -3) == ".ai") || (substr(strtolower($QUERYSTRING), -4) == ".eps")) { echo "allowed"; } else { echo "not allowed"; }
based on 7OYAM
Output for 5.0.4 - 7.1.0
test.php.eps Notice: Undefined variable: changess in /in/D2Mtn on line 10 allowed
Output for 4.3.0 - 5.0.3
test.php.eps Notice: Undefined variable: changess in /in/D2Mtn on line 10 allowed