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 $name; echo "\n"; }
based on pLObR
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/): failed to open dir: Permission denied in /in/oDhVX:3 Stack trace: #0 /in/oDhVX(3): RecursiveDirectoryIterator->__construct('/') #1 {main} thrown in /in/oDhVX on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/): failed to open dir: Permission denied' in /in/oDhVX:3 Stack trace: #0 /in/oDhVX(3): RecursiveDirectoryIterator->__construct('/') #1 {main} thrown in /in/oDhVX on line 3
Process exited with code 255.