3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(scandir('glob:///etc/*'));
Output for 5.6.28, 7.0.14 - 7.1.0
array(56) { [0]=> string(13) "ImageMagick-6" [1]=> string(15) "ODBCDataSources" [2]=> string(12) "arch-release" [3]=> string(16) "bash.bash_logout" [4]=> string(11) "bash.bashrc" [5]=> string(15) "ca-certificates" [6]=> string(8) "crypttab" [7]=> string(7) "default" [8]=> string(11) "environment" [9]=> string(5) "fonts" [10]=> string(5) "fstab" [11]=> string(8) "gai.conf" [12]=> string(5) "group" [13]=> string(7) "gshadow" [14]=> string(4) "hhvm" [15]=> string(9) "host.conf" [16]=> string(5) "hosts" [17]=> string(7) "inputrc" [18]=> string(5) "issue" [19]=> string(9) "krb5.conf" [20]=> string(11) "ld.so.cache" [21]=> string(10) "ld.so.conf" [22]=> string(12) "ld.so.conf.d" [23]=> string(10) "locale.gen" [24]=> string(9) "localtime" [25]=> string(10) "login.defs" [26]=> string(10) "machine-id" [27]=> string(11) "mke2fs.conf" [28]=> string(4) "motd" [29]=> string(4) "mtab" [30]=> string(9) "netconfig" [31]=> string(9) "nscd.conf" [32]=> string(13) "nsswitch.conf" [33]=> string(8) "odbc.ini" [34]=> string(12) "odbcinst.ini" [35]=> string(8) "openldap" [36]=> string(8) "pacman.d" [37]=> string(5) "pam.d" [38]=> string(6) "passwd" [39]=> string(7) "php.ini" [40]=> string(15) "php_archive.ini" [41]=> string(6) "pkcs11" [42]=> string(7) "profile" [43]=> string(9) "profile.d" [44]=> string(9) "protocols" [45]=> string(16) "request-key.conf" [46]=> string(13) "request-key.d" [47]=> string(11) "resolv.conf" [48]=> string(3) "rpc" [49]=> string(9) "securetty" [50]=> string(8) "security" [51]=> string(8) "services" [52]=> string(6) "shadow" [53]=> string(6) "shells" [54]=> string(4) "skel" [55]=> string(3) "ssl" }
Output for 5.5.24 - 5.5.28, 5.5.35 - 5.6.12, 5.6.21, hhvm-3.12.0, 7.0.6
array(55) { [0]=> string(13) "ImageMagick-6" [1]=> string(15) "ODBCDataSources" [2]=> string(12) "arch-release" [3]=> string(16) "bash.bash_logout" [4]=> string(11) "bash.bashrc" [5]=> string(15) "ca-certificates" [6]=> string(8) "crypttab" [7]=> string(7) "default" [8]=> string(11) "environment" [9]=> string(5) "fonts" [10]=> string(5) "fstab" [11]=> string(8) "gai.conf" [12]=> string(5) "group" [13]=> string(7) "gshadow" [14]=> string(4) "hhvm" [15]=> string(9) "host.conf" [16]=> string(5) "hosts" [17]=> string(7) "inputrc" [18]=> string(5) "issue" [19]=> string(9) "krb5.conf" [20]=> string(11) "ld.so.cache" [21]=> string(10) "ld.so.conf" [22]=> string(12) "ld.so.conf.d" [23]=> string(10) "locale.gen" [24]=> string(9) "localtime" [25]=> string(10) "login.defs" [26]=> string(11) "mke2fs.conf" [27]=> string(4) "motd" [28]=> string(4) "mtab" [29]=> string(9) "netconfig" [30]=> string(9) "nscd.conf" [31]=> string(13) "nsswitch.conf" [32]=> string(8) "odbc.ini" [33]=> string(12) "odbcinst.ini" [34]=> string(8) "openldap" [35]=> string(8) "pacman.d" [36]=> string(5) "pam.d" [37]=> string(6) "passwd" [38]=> string(7) "php.ini" [39]=> string(15) "php_archive.ini" [40]=> string(6) "pkcs11" [41]=> string(7) "profile" [42]=> string(9) "profile.d" [43]=> string(9) "protocols" [44]=> string(16) "request-key.conf" [45]=> string(13) "request-key.d" [46]=> string(11) "resolv.conf" [47]=> string(3) "rpc" [48]=> string(9) "securetty" [49]=> string(8) "security" [50]=> string(8) "services" [51]=> string(6) "shadow" [52]=> string(6) "shells" [53]=> string(4) "skel" [54]=> string(3) "ssl" }
Output for 5.5.29 - 5.5.32, 5.5.34, 5.6.13 - 5.6.17, 5.6.20, hhvm-3.10.0, 7.0.0 - 7.0.3, 7.0.5
array(54) { [0]=> string(13) "ImageMagick-6" [1]=> string(15) "ODBCDataSources" [2]=> string(12) "arch-release" [3]=> string(16) "bash.bash_logout" [4]=> string(11) "bash.bashrc" [5]=> string(15) "ca-certificates" [6]=> string(8) "crypttab" [7]=> string(7) "default" [8]=> string(11) "environment" [9]=> string(5) "fonts" [10]=> string(5) "fstab" [11]=> string(8) "gai.conf" [12]=> string(5) "group" [13]=> string(7) "gshadow" [14]=> string(4) "hhvm" [15]=> string(9) "host.conf" [16]=> string(5) "hosts" [17]=> string(7) "inputrc" [18]=> string(5) "issue" [19]=> string(9) "krb5.conf" [20]=> string(11) "ld.so.cache" [21]=> string(10) "ld.so.conf" [22]=> string(12) "ld.so.conf.d" [23]=> string(10) "locale.gen" [24]=> string(9) "localtime" [25]=> string(10) "login.defs" [26]=> string(11) "mke2fs.conf" [27]=> string(4) "motd" [28]=> string(4) "mtab" [29]=> string(9) "netconfig" [30]=> string(9) "nscd.conf" [31]=> string(13) "nsswitch.conf" [32]=> string(8) "odbc.ini" [33]=> string(12) "odbcinst.ini" [34]=> string(8) "openldap" [35]=> string(8) "pacman.d" [36]=> string(5) "pam.d" [37]=> string(6) "passwd" [38]=> string(7) "php.ini" [39]=> string(6) "pkcs11" [40]=> string(7) "profile" [41]=> string(9) "profile.d" [42]=> string(9) "protocols" [43]=> string(16) "request-key.conf" [44]=> string(13) "request-key.d" [45]=> string(11) "resolv.conf" [46]=> string(3) "rpc" [47]=> string(9) "securetty" [48]=> string(8) "security" [49]=> string(8) "services" [50]=> string(6) "shadow" [51]=> string(6) "shells" [52]=> string(4) "skel" [53]=> string(3) "ssl" }
Output for 5.3.0 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4
array(0) { }
Output for 5.0.0 - 5.2.17
Notice: scandir(): Unable to find the wrapper "glob" - did you forget to enable it when you configured PHP? in /in/69UQM on line 1 Warning: scandir(glob:///etc/*): failed to open dir: No such file or directory in /in/69UQM on line 1 Warning: scandir(): (errno 2): No such file or directory in /in/69UQM on line 1 bool(false)
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/69UQM on line 1
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: scandir() in /in/69UQM on line 1
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: scandir() in /in/69UQM on line 1