3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mkdir('/tmp/test' . mt_rand()); $iterator = new RecursiveDirectoryIterator('/tmp/test', FilesystemIterator::SKIP_DOTS); foreach ($iterator as $path => $file) var_dump($path);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/tmp/test): failed to open dir: No such file or directory in /in/BBLSH:5 Stack trace: #0 /in/BBLSH(5): RecursiveDirectoryIterator->__construct('/tmp/test', 4096) #1 {main} thrown in /in/BBLSH on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/tmp/test): failed to open dir' in /in/BBLSH:5 Stack trace: #0 /in/BBLSH(5): RecursiveDirectoryIterator->__construct() #1 {main}
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/tmp/test): failed to open dir: No such file or directory' in /in/BBLSH:5 Stack trace: #0 /in/BBLSH(5): RecursiveDirectoryIterator->__construct('/tmp/test', 4096) #1 {main} thrown in /in/BBLSH on line 5
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Fatal error: Class 'FilesystemIterator' not found in /in/BBLSH on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/BBLSH on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/BBLSH on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/BBLSH on line 5
Process exited with code 255.