3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = dir(dirname(sys_get_temp_dir())."/etc"); while (false !== ($entry = $d->read())) { echo $entry."\n";} $file = fopen('/etc/shadow', 'r'); while($line = fgets($file)) { printf("%s\n", $line); }
Output for 5.6.28, 7.0.14 - 7.1.0
. .. ImageMagick-6 ODBCDataSources ca-certificates default fonts hhvm ld.so.conf.d openldap pacman.d pam.d pkcs11 profile.d request-key.d security skel ssl arch-release crypttab fstab group gshadow host.conf hosts issue ld.so.conf motd netconfig nsswitch.conf passwd profile request-key.conf resolv.conf securetty shadow shells rpc nscd.conf gai.conf locale.gen mke2fs.conf krb5.conf environment machine-id php_archive.ini php.ini mtab localtime bash.bash_logout bash.bashrc inputrc ld.so.cache login.defs odbc.ini odbcinst.ini protocols services Warning: fopen(/etc/shadow): failed to open stream: Permission denied in /in/RVXCU on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/RVXCU on line 8
Output for 5.5.25 - 5.5.26, 5.6.8 - 5.6.10, 5.6.21, 7.0.6
. .. mtab ImageMagick-6 ODBCDataSources ca-certificates default fonts hhvm ld.so.conf.d openldap pacman.d pam.d pkcs11 profile.d request-key.d security skel ssl inputrc krb5.conf login.defs odbc.ini odbcinst.ini request-key.conf mke2fs.conf arch-release crypttab fstab group gshadow host.conf hosts issue motd nsswitch.conf passwd profile resolv.conf securetty shadow shells netconfig bash.bash_logout bash.bashrc environment gai.conf ld.so.conf locale.gen nscd.conf rpc php.ini php_archive.ini protocols services ld.so.cache localtime Warning: fopen(/etc/shadow): failed to open stream: Permission denied in /in/RVXCU on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/RVXCU on line 8
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
. .. mtab ImageMagick-6 ODBCDataSources ca-certificates default fonts hhvm ld.so.conf.d openldap pacman.d pam.d pkcs11 profile.d request-key.d security skel ssl inputrc krb5.conf login.defs odbc.ini odbcinst.ini php.ini request-key.conf mke2fs.conf arch-release crypttab fstab group gshadow host.conf hosts issue motd nsswitch.conf passwd profile resolv.conf securetty shadow shells protocols services netconfig bash.bash_logout bash.bashrc environment gai.conf ld.so.cache ld.so.conf locale.gen nscd.conf rpc localtime Warning: fopen(/etc/shadow): failed to open stream: Permission denied in /in/RVXCU on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/RVXCU on line 8
Output for 7.0.4
Warning: dir(//etc): failed to open dir: Permission denied in /in/RVXCU on line 2 Fatal error: Uncaught Error: Call to a member function read() on boolean in /in/RVXCU:4 Stack trace: #0 {main} thrown in /in/RVXCU on line 4
Process exited with code 255.
Output for 5.6.18 - 5.6.19
Warning: dir(//etc): failed to open dir: Permission denied in /in/RVXCU on line 2 Fatal error: Call to a member function read() on boolean in /in/RVXCU on line 4
Process exited with code 255.
Output for 5.5.27 - 5.5.28, 5.6.11 - 5.6.12
. .. mtab ImageMagick-6 ODBCDataSources ca-certificates default fonts hhvm ld.so.conf.d openldap pacman.d pam.d pkcs11 profile.d request-key.d security skel ssl inputrc krb5.conf login.defs odbc.ini odbcinst.ini request-key.conf mke2fs.conf arch-release crypttab fstab group gshadow host.conf hosts issue motd nsswitch.conf passwd profile resolv.conf securetty shadow shells netconfig bash.bash_logout bash.bashrc environment gai.conf ld.so.conf locale.gen nscd.conf rpc ld.so.cache php.ini php_archive.ini protocols services localtime Warning: fopen(/etc/shadow): failed to open stream: Permission denied in /in/RVXCU on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/RVXCU on line 8
Output for 5.5.24, 5.5.35 - 5.6.7
. .. mtab ImageMagick-6 ODBCDataSources ca-certificates default fonts hhvm ld.so.conf.d openldap pacman.d pam.d pkcs11 profile.d request-key.d security skel ssl arch-release bash.bash_logout bash.bashrc crypttab environment fstab gai.conf group gshadow host.conf hosts inputrc issue krb5.conf ld.so.cache ld.so.conf locale.gen login.defs mke2fs.conf motd netconfig nscd.conf nsswitch.conf odbc.ini odbcinst.ini passwd php.ini php_archive.ini profile protocols request-key.conf resolv.conf rpc securetty services shadow shells localtime Warning: fopen(/etc/shadow): failed to open stream: Permission denied in /in/RVXCU on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/RVXCU on line 8
Output for 5.2.1 - 5.4.45, 5.5.33
Warning: dir(//etc): failed to open dir: Permission denied in /in/RVXCU on line 2 Fatal error: Call to a member function read() on a non-object in /in/RVXCU on line 4
Process exited with code 255.
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function sys_get_temp_dir() in /in/RVXCU on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: sys_get_temp_dir() in /in/RVXCU on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: sys_get_temp_dir() in /in/RVXCU on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: sys_get_temp_dir() in /in/RVXCU on line 2