3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $attempts = [ '/admin/scripts/vuln.php', '/admin/scripts/unsafe.php', '/admin/lib/blocked.php', '/admin/hello.php', '/admin/lib/hello.php', '/admin/scripts/vulner.php', 'admin/' ]; foreach($attempts as $attempt) { $success = preg_match('/(\/admin\/(scripts|lib)\/(vuln|unsafe|blocked)\.php)/', $attempt, $matches); var_dump($success); var_dump($matches); }
Output for 7.1.12
int(1) array(4) { [0]=> string(23) "/admin/scripts/vuln.php" [1]=> string(23) "/admin/scripts/vuln.php" [2]=> string(7) "scripts" [3]=> string(4) "vuln" } int(1) array(4) { [0]=> string(25) "/admin/scripts/unsafe.php" [1]=> string(25) "/admin/scripts/unsafe.php" [2]=> string(7) "scripts" [3]=> string(6) "unsafe" } int(1) array(4) { [0]=> string(22) "/admin/lib/blocked.php" [1]=> string(22) "/admin/lib/blocked.php" [2]=> string(3) "lib" [3]=> string(7) "blocked" } int(0) array(0) { } int(0) array(0) { } int(0) array(0) { } int(0) array(0) { }