3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $objects = new RecursiveIteratorIterator( new RecursiveDirectoryIterator("/"), RecursiveIteratorIterator::SELF_FIRST); foreach($objects as $name => $object){ echo $object->getPathname(); }
based on GtkIR
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/): failed to open dir: Permission denied in /in/pLObR:3 Stack trace: #0 /in/pLObR(3): RecursiveDirectoryIterator->__construct('/') #1 {main} thrown in /in/pLObR on line 3
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/): failed to open dir' in /in/pLObR:3 Stack trace: #0 /in/pLObR(3): RecursiveDirectoryIterator->__construct() #1 {main}
Process exited with code 255.
Output for 5.3.9 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/): failed to open dir: Permission denied' in /in/pLObR:3 Stack trace: #0 /in/pLObR(3): RecursiveDirectoryIterator->__construct('/') #1 {main} thrown in /in/pLObR on line 3
Process exited with code 255.