3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $files = new DirectoryIterator("/"); foreach($files as $file) { print $file->getFilename() . "\n"; }
Output for 7.1.20, 7.2.6
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp:/in) in /in/8oddm:3 Stack trace: #0 /in/8oddm(3): DirectoryIterator->__construct('/') #1 {main} thrown in /in/8oddm on line 3
Process exited with code 255.
Output for 7.1.10, 7.2.0
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(/): failed to open dir: Permission denied in /in/8oddm:3 Stack trace: #0 /in/8oddm(3): DirectoryIterator->__construct('/') #1 {main} thrown in /in/8oddm on line 3
Process exited with code 255.
Output for 7.0.0 - 7.1.7
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp/) in /in/8oddm:3 Stack trace: #0 /in/8oddm(3): DirectoryIterator->__construct('/') #1 {main} thrown in /in/8oddm on line 3
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/): failed to open dir' in /in/8oddm:3 Stack trace: #0 /in/8oddm(3): DirectoryIterator->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp/)' in /in/8oddm:3 Stack trace: #0 /in/8oddm(3): DirectoryIterator->__construct('/') #1 {main} thrown in /in/8oddm on line 3
Process exited with code 255.