3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo '$_GET = '. print_r($_GET); for ($files = scandir('.', 1); $files; ) { $file = array_pop($files); if (is_file($file) && !is_dir($file)) { break; } } echo '$file = '. $file; ?>
Output for 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
Array ( ) $_GET = 1 Warning: scandir(.): failed to open dir: Permission denied in /in/NXTfR on line 3 Warning: scandir(): (errno 13): Permission denied in /in/NXTfR on line 3 Notice: Undefined variable: file in /in/NXTfR on line 9 $file =
Output for hhvm-3.10.0 - 3.12.0
Array ( ) $_GET = 1 Warning: Permission denied in /in/NXTfR on line 3 Notice: Undefined variable: file in /in/NXTfR on line 9 $file =
Output for 5.2.3 - 5.4.45
Array ( ) $_GET = 1 Warning: scandir(.): failed to open dir: Permission denied in /in/NXTfR on line 3 Warning: scandir(): (errno 13): Permission denied in /in/NXTfR on line 3 $file =
Output for 5.0.0 - 5.2.2
Array ( ) $_GET = 1<br /> <b>Warning</b>: scandir(.) [<a href='function.scandir'>function.scandir</a>]: failed to open dir: Permission denied in <b>/in/NXTfR</b> on line <b>3</b><br /> <br /> <b>Warning</b>: scandir() [<a href='function.scandir'>function.scandir</a>]: (errno 13): Permission denied in <b>/in/NXTfR</b> on line <b>3</b><br /> $file =
Output for 4.4.5 - 4.4.9
Array ( ) $_GET = 1<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/NXTfR</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Array ( ) $_GET = 1<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/NXTfR</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Array ( [/in/NXTfR] => ) $_GET = 1<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/NXTfR</b> on line <b>3</b><br />