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/os-release', 'r'); while($line = fgets($file)) { printf("%s\n", $line); }
Output for 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/os-release): failed to open stream: No such file or directory in /in/4e32G on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/4e32G on line 8
Output for 7.0.12
. .. 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 login.defs motd netconfig nsswitch.conf odbc.ini odbcinst.ini passwd profile request-key.conf resolv.conf securetty shadow shells services protocols rpc nscd.conf gai.conf locale.gen inputrc bash.bashrc bash.bash_logout mke2fs.conf krb5.conf environment ld.so.cache machine-id php_archive.ini php.ini mtab localtime Warning: fopen(/etc/os-release): failed to open stream: No such file or directory in /in/4e32G on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/4e32G on line 8
Output for 5.3.0 - 5.6.26, 7.0.0 - 7.0.11
. .. 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 crypttab fstab group gshadow host.conf hosts issue ld.so.conf login.defs motd netconfig nsswitch.conf odbc.ini odbcinst.ini passwd profile request-key.conf resolv.conf securetty shadow shells services protocols rpc nscd.conf gai.conf locale.gen inputrc bash.bashrc bash.bash_logout mke2fs.conf krb5.conf environment ld.so.cache machine-id php.ini php_archive.ini localtime Warning: fopen(/etc/os-release): failed to open stream: No such file or directory in /in/4e32G on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/4e32G on line 8
Output for hhvm-3.10.0 - 3.13.2
. .. ld.so.conf.d skel profile.d ssl pkcs11 ca-certificates openldap request-key.conf request-key.d pam.d default security login.defs fonts ImageMagick-6 hhvm pacman.d ODBCDataSources odbc.ini odbcinst.ini ld.so.conf netconfig fstab group host.conf hosts issue motd nsswitch.conf passwd resolv.conf securetty shells profile mtab gshadow shadow crypttab arch-release machine-id services protocols krb5.conf php_archive.ini rpc nscd.conf gai.conf locale.gen inputrc bash.bashrc bash.bash_logout mke2fs.conf environment ld.so.cache php.ini localtime Warning: No such file or directory in /in/4e32G on line 6 Warning: fgets() expects parameter 1 to be resource, boolean given in /in/4e32G on line 8
Output for 5.2.1 - 5.2.17
. .. 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 crypttab fstab group gshadow host.conf hosts issue ld.so.conf login.defs motd netconfig nsswitch.conf odbc.ini odbcinst.ini passwd profile request-key.conf resolv.conf securetty shadow shells services protocols rpc nscd.conf gai.conf locale.gen inputrc bash.bashrc bash.bash_logout mke2fs.conf krb5.conf environment ld.so.cache machine-id php.ini php_archive.ini localtime Warning: fopen(/etc/os-release): failed to open stream: No such file or directory in /in/4e32G on line 6 Warning: fgets(): supplied argument is not a valid stream resource in /in/4e32G on line 8
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function sys_get_temp_dir() in /in/4e32G 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/4e32G 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/4e32G 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/4e32G on line 2