3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$f = new SplFileObject('/usr/hi.txt', "w+"); $iterator = new RecursiveDirectoryIterator('/etc'); while($iterator->valid()) { $file = $iterator->current(); echo $iterator->key() . " => " . $file->getFilename() . "\n"; $iterator->next(); }
Output for 7.0.4, 7.2.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/etc): failed to open dir: Permission denied in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): RecursiveDirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 7.0.20, 7.1.5 - 7.1.10
/etc/. => . /etc/.. => .. /etc/mtab => mtab /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/pacman.d => pacman.d /etc/profile.d => profile.d /etc/skel => skel /etc/arch-release => arch-release /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/crypttab => crypttab /etc/fstab => fstab /etc/gai.conf => gai.conf /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/inputrc => inputrc /etc/issue => issue /etc/ld.so.cache => ld.so.cache /etc/ld.so.conf => ld.so.conf /etc/locale.gen => locale.gen /etc/machine-id => machine-id /etc/motd => motd /etc/nscd.conf => nscd.conf /etc/nsswitch.conf => nsswitch.conf /etc/passwd => passwd /etc/php.ini => php.ini /etc/php_archive.ini => php_archive.ini /etc/profile => profile /etc/protocols => protocols /etc/resolv.conf => resolv.conf /etc/rpc => rpc /etc/securetty => securetty /etc/services => services /etc/shadow => shadow /etc/shells => shells /etc/localtime => localtime
Output for 5.6.28, 7.0.14, 7.1.0
/etc/. => . /etc/.. => .. /etc/ImageMagick-6 => ImageMagick-6 /etc/ODBCDataSources => ODBCDataSources /etc/ca-certificates => ca-certificates /etc/default => default /etc/fonts => fonts /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/openldap => openldap /etc/pacman.d => pacman.d /etc/pam.d => pam.d /etc/pkcs11 => pkcs11 /etc/profile.d => profile.d /etc/request-key.d => request-key.d /etc/security => security /etc/skel => skel /etc/ssl => ssl /etc/arch-release => arch-release /etc/crypttab => crypttab /etc/fstab => fstab /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/issue => issue /etc/ld.so.conf => ld.so.conf /etc/motd => motd /etc/netconfig => netconfig /etc/nsswitch.conf => nsswitch.conf /etc/passwd => passwd /etc/profile => profile /etc/request-key.conf => request-key.conf /etc/resolv.conf => resolv.conf /etc/securetty => securetty /etc/shadow => shadow /etc/shells => shells /etc/rpc => rpc /etc/nscd.conf => nscd.conf /etc/gai.conf => gai.conf /etc/locale.gen => locale.gen /etc/mke2fs.conf => mke2fs.conf /etc/krb5.conf => krb5.conf /etc/environment => environment /etc/machine-id => machine-id /etc/php_archive.ini => php_archive.ini /etc/php.ini => php.ini /etc/mtab => mtab /etc/localtime => localtime /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/inputrc => inputrc /etc/ld.so.cache => ld.so.cache /etc/login.defs => login.defs /etc/odbc.ini => odbc.ini /etc/odbcinst.ini => odbcinst.ini /etc/protocols => protocols /etc/services => services
Output for 5.5.24 - 5.5.26, 5.6.8 - 5.6.10, 5.6.21, 7.0.6
/etc/. => . /etc/.. => .. /etc/mtab => mtab /etc/ImageMagick-6 => ImageMagick-6 /etc/ODBCDataSources => ODBCDataSources /etc/ca-certificates => ca-certificates /etc/default => default /etc/fonts => fonts /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/openldap => openldap /etc/pacman.d => pacman.d /etc/pam.d => pam.d /etc/pkcs11 => pkcs11 /etc/profile.d => profile.d /etc/request-key.d => request-key.d /etc/security => security /etc/skel => skel /etc/ssl => ssl /etc/inputrc => inputrc /etc/krb5.conf => krb5.conf /etc/login.defs => login.defs /etc/odbc.ini => odbc.ini /etc/odbcinst.ini => odbcinst.ini /etc/request-key.conf => request-key.conf /etc/mke2fs.conf => mke2fs.conf /etc/arch-release => arch-release /etc/crypttab => crypttab /etc/fstab => fstab /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/issue => issue /etc/motd => motd /etc/nsswitch.conf => nsswitch.conf /etc/passwd => passwd /etc/profile => profile /etc/resolv.conf => resolv.conf /etc/securetty => securetty /etc/shadow => shadow /etc/shells => shells /etc/netconfig => netconfig /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/environment => environment /etc/gai.conf => gai.conf /etc/ld.so.conf => ld.so.conf /etc/locale.gen => locale.gen /etc/nscd.conf => nscd.conf /etc/rpc => rpc /etc/php.ini => php.ini /etc/php_archive.ini => php_archive.ini /etc/protocols => protocols /etc/services => services /etc/ld.so.cache => ld.so.cache /etc/localtime => localtime
Output for 5.5.29 - 5.5.32, 5.5.34, 5.6.13 - 5.6.17, 5.6.20, 7.0.0 - 7.0.3, 7.0.5
/etc/. => . /etc/.. => .. /etc/mtab => mtab /etc/ImageMagick-6 => ImageMagick-6 /etc/ODBCDataSources => ODBCDataSources /etc/ca-certificates => ca-certificates /etc/default => default /etc/fonts => fonts /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/openldap => openldap /etc/pacman.d => pacman.d /etc/pam.d => pam.d /etc/pkcs11 => pkcs11 /etc/profile.d => profile.d /etc/request-key.d => request-key.d /etc/security => security /etc/skel => skel /etc/ssl => ssl /etc/inputrc => inputrc /etc/krb5.conf => krb5.conf /etc/login.defs => login.defs /etc/odbc.ini => odbc.ini /etc/odbcinst.ini => odbcinst.ini /etc/php.ini => php.ini /etc/request-key.conf => request-key.conf /etc/mke2fs.conf => mke2fs.conf /etc/arch-release => arch-release /etc/crypttab => crypttab /etc/fstab => fstab /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/issue => issue /etc/motd => motd /etc/nsswitch.conf => nsswitch.conf /etc/passwd => passwd /etc/profile => profile /etc/resolv.conf => resolv.conf /etc/securetty => securetty /etc/shadow => shadow /etc/shells => shells /etc/protocols => protocols /etc/services => services /etc/netconfig => netconfig /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/environment => environment /etc/gai.conf => gai.conf /etc/ld.so.cache => ld.so.cache /etc/ld.so.conf => ld.so.conf /etc/locale.gen => locale.gen /etc/nscd.conf => nscd.conf /etc/rpc => rpc /etc/localtime => localtime
Output for 5.1.3 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): RecursiveDirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 5.5.27 - 5.5.28, 5.6.11 - 5.6.12
/etc/. => . /etc/.. => .. /etc/mtab => mtab /etc/ImageMagick-6 => ImageMagick-6 /etc/ODBCDataSources => ODBCDataSources /etc/ca-certificates => ca-certificates /etc/default => default /etc/fonts => fonts /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/openldap => openldap /etc/pacman.d => pacman.d /etc/pam.d => pam.d /etc/pkcs11 => pkcs11 /etc/profile.d => profile.d /etc/request-key.d => request-key.d /etc/security => security /etc/skel => skel /etc/ssl => ssl /etc/inputrc => inputrc /etc/krb5.conf => krb5.conf /etc/login.defs => login.defs /etc/odbc.ini => odbc.ini /etc/odbcinst.ini => odbcinst.ini /etc/request-key.conf => request-key.conf /etc/mke2fs.conf => mke2fs.conf /etc/arch-release => arch-release /etc/crypttab => crypttab /etc/fstab => fstab /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/issue => issue /etc/motd => motd /etc/nsswitch.conf => nsswitch.conf /etc/passwd => passwd /etc/profile => profile /etc/resolv.conf => resolv.conf /etc/securetty => securetty /etc/shadow => shadow /etc/shells => shells /etc/netconfig => netconfig /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/environment => environment /etc/gai.conf => gai.conf /etc/ld.so.conf => ld.so.conf /etc/locale.gen => locale.gen /etc/nscd.conf => nscd.conf /etc/rpc => rpc /etc/ld.so.cache => ld.so.cache /etc/php.ini => php.ini /etc/php_archive.ini => php_archive.ini /etc/protocols => protocols /etc/services => services /etc/localtime => localtime
Output for 5.5.35 - 5.6.7
/etc/. => . /etc/.. => .. /etc/mtab => mtab /etc/ImageMagick-6 => ImageMagick-6 /etc/ODBCDataSources => ODBCDataSources /etc/ca-certificates => ca-certificates /etc/default => default /etc/fonts => fonts /etc/hhvm => hhvm /etc/ld.so.conf.d => ld.so.conf.d /etc/openldap => openldap /etc/pacman.d => pacman.d /etc/pam.d => pam.d /etc/pkcs11 => pkcs11 /etc/profile.d => profile.d /etc/request-key.d => request-key.d /etc/security => security /etc/skel => skel /etc/ssl => ssl /etc/arch-release => arch-release /etc/bash.bash_logout => bash.bash_logout /etc/bash.bashrc => bash.bashrc /etc/crypttab => crypttab /etc/environment => environment /etc/fstab => fstab /etc/gai.conf => gai.conf /etc/group => group /etc/gshadow => gshadow /etc/host.conf => host.conf /etc/hosts => hosts /etc/inputrc => inputrc /etc/issue => issue /etc/krb5.conf => krb5.conf /etc/ld.so.cache => ld.so.cache /etc/ld.so.conf => ld.so.conf /etc/locale.gen => locale.gen /etc/login.defs => login.defs /etc/mke2fs.conf => mke2fs.conf /etc/motd => motd /etc/netconfig => netconfig /etc/nscd.conf => nscd.conf /etc/nsswitch.conf => nsswitch.conf /etc/odbc.ini => odbc.ini /etc/odbcinst.ini => odbcinst.ini /etc/passwd => passwd /etc/php.ini => php.ini /etc/php_archive.ini => php_archive.ini /etc/profile => profile /etc/protocols => protocols /etc/request-key.conf => request-key.conf /etc/resolv.conf => resolv.conf /etc/rpc => rpc /etc/securetty => securetty /etc/services => services /etc/shadow => shadow /etc/shells => shells /etc/localtime => localtime
Output for 5.1.2
Fatal error: Uncaught exception 'RuntimeException' with message 'RecursiveDirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): RecursiveDirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.1
Fatal error: Uncaught exception 'RuntimeException' with message 'DirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): DirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 5.0.5
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): DirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 5.0.3 - 5.0.4
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 /in/q3kee(3): RecursiveDirectoryIterator->__construct('/etc') #1 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/etc): failed to open dir: Permission denied' in /in/q3kee:3 Stack trace: #0 {main} thrown in /in/q3kee on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: recursivedirectoryiterator in /in/q3kee on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: recursivedirectoryiterator in /in/q3kee on line 3