3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dir = new DirectoryIterator(__DIR__); $iterator = new CachingIterator($dir); foreach ($dir as $val);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(/in): failed to open dir: Permission denied in /in/7Kpjl:3 Stack trace: #0 /in/7Kpjl(3): DirectoryIterator->__construct('/in') #1 {main} thrown in /in/7Kpjl on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/in): failed to open dir: Permission denied' in /in/7Kpjl:3 Stack trace: #0 /in/7Kpjl(3): DirectoryIterator->__construct('/in') #1 {main} thrown in /in/7Kpjl on line 3
Process exited with code 255.