3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php version_compare(PHP_VERSION, '5.3.0', '>=') or die('SKIPPED'); $dir = new RecursiveDirectoryIterator(__DIR__); foreach ($dir as $fileinfo) { printf("%s %s\n", $fileinfo, $dir->isDot() ? "OMG A DOT!!" : ""); }
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/in): failed to open dir: Permission denied in /in/PqIuC:3 Stack trace: #0 /in/PqIuC(3): RecursiveDirectoryIterator->__construct('/in') #1 {main} thrown in /in/PqIuC on line 3
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/in): failed to open dir: Permission denied' in /in/PqIuC:3 Stack trace: #0 /in/PqIuC(3): RecursiveDirectoryIterator->__construct('/in') #1 {main} thrown in /in/PqIuC on line 3
Process exited with code 255.
Output for 4.3.0 - 5.2.17
SKIPPED