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/passwd', '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 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/usr/bin/nologin daemon:x:2:2:daemon:/:/usr/bin/nologin mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin http:x:33:33:http:/srv/http:/usr/bin/nologin uuidd:x:68:68:uuidd:/:/usr/bin/nologin dbus:x:81:81:dbus:/:/usr/bin/nologin nobody:x:99:99:nobody:/:/usr/bin/nologin systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
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 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/usr/bin/nologin daemon:x:2:2:daemon:/:/usr/bin/nologin mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin http:x:33:33:http:/srv/http:/usr/bin/nologin uuidd:x:68:68:uuidd:/:/usr/bin/nologin dbus:x:81:81:dbus:/:/usr/bin/nologin nobody:x:99:99:nobody:/:/usr/bin/nologin systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
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 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/usr/bin/nologin daemon:x:2:2:daemon:/:/usr/bin/nologin mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin http:x:33:33:http:/srv/http:/usr/bin/nologin uuidd:x:68:68:uuidd:/:/usr/bin/nologin dbus:x:81:81:dbus:/:/usr/bin/nologin nobody:x:99:99:nobody:/:/usr/bin/nologin systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
Output for 7.0.4
Warning: dir(//etc): failed to open dir: Permission denied in /in/g82ia on line 2 Fatal error: Uncaught Error: Call to a member function read() on boolean in /in/g82ia:4 Stack trace: #0 {main} thrown in /in/g82ia 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/g82ia on line 2 Fatal error: Call to a member function read() on boolean in /in/g82ia 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 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/usr/bin/nologin daemon:x:2:2:daemon:/:/usr/bin/nologin mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin http:x:33:33:http:/srv/http:/usr/bin/nologin uuidd:x:68:68:uuidd:/:/usr/bin/nologin dbus:x:81:81:dbus:/:/usr/bin/nologin nobody:x:99:99:nobody:/:/usr/bin/nologin systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
Output for 5.5.24, 5.5.35
. .. 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 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/usr/bin/nologin daemon:x:2:2:daemon:/:/usr/bin/nologin mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin http:x:33:33:http:/srv/http:/usr/bin/nologin uuidd:x:68:68:uuidd:/:/usr/bin/nologin dbus:x:81:81:dbus:/:/usr/bin/nologin nobody:x:99:99:nobody:/:/usr/bin/nologin systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
Output for 5.2.1 - 5.4.45, 5.5.33
Warning: dir(//etc): failed to open dir: Permission denied in /in/g82ia on line 2 Fatal error: Call to a member function read() on a non-object in /in/g82ia 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/g82ia 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/g82ia 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/g82ia 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/g82ia on line 2