3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php chdir('/etc/'); print_r(glob('*.*'));
Output for 7.1.20, 7.2.6
Warning: chdir(): open_basedir restriction in effect. File(/etc/) is not within the allowed path(s): (/tmp:/in) in /in/XfJ2S on line 2
Output for 4.3.0 - 4.3.6, 4.3.9 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.2.0
Array ( )
Output for 7.0.20, 7.1.5 - 7.1.10
Array ( [0] => bash.bash_logout [1] => bash.bashrc [2] => gai.conf [3] => host.conf [4] => ld.so.cache [5] => ld.so.conf [6] => ld.so.conf.d [7] => locale.gen [8] => nscd.conf [9] => nsswitch.conf [10] => pacman.d [11] => php.ini [12] => php_archive.ini [13] => profile.d [14] => resolv.conf )
Output for 5.5.24 - 5.5.28, 5.5.35 - 5.6.12, 5.6.21, 7.0.6 - 7.0.14, 7.1.0
Array ( [0] => bash.bash_logout [1] => bash.bashrc [2] => gai.conf [3] => host.conf [4] => krb5.conf [5] => ld.so.cache [6] => ld.so.conf [7] => ld.so.conf.d [8] => locale.gen [9] => login.defs [10] => mke2fs.conf [11] => nscd.conf [12] => nsswitch.conf [13] => odbc.ini [14] => odbcinst.ini [15] => pacman.d [16] => pam.d [17] => php.ini [18] => php_archive.ini [19] => profile.d [20] => request-key.conf [21] => request-key.d [22] => resolv.conf )
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
Array ( [0] => bash.bash_logout [1] => bash.bashrc [2] => gai.conf [3] => host.conf [4] => krb5.conf [5] => ld.so.cache [6] => ld.so.conf [7] => ld.so.conf.d [8] => locale.gen [9] => login.defs [10] => mke2fs.conf [11] => nscd.conf [12] => nsswitch.conf [13] => odbc.ini [14] => odbcinst.ini [15] => pacman.d [16] => pam.d [17] => php.ini [18] => profile.d [19] => request-key.conf [20] => request-key.d [21] => resolv.conf )
Output for 4.3.7 - 4.3.8