3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(scandir('/etc/'));
Output for 7.0.20, 7.1.5 - 7.1.10, 7.2.11 - 7.3.0rc4
Array ( [0] => . [1] => .. [2] => arch-release [3] => bash.bash_logout [4] => bash.bashrc [5] => crypttab [6] => fstab [7] => gai.conf [8] => group [9] => gshadow [10] => hhvm [11] => host.conf [12] => hosts [13] => inputrc [14] => issue [15] => ld.so.cache [16] => ld.so.conf [17] => ld.so.conf.d [18] => locale.gen [19] => localtime [20] => machine-id [21] => motd [22] => mtab [23] => nscd.conf [24] => nsswitch.conf [25] => pacman.d [26] => passwd [27] => php.ini [28] => php_archive.ini [29] => profile [30] => profile.d [31] => protocols [32] => resolv.conf [33] => rpc [34] => securetty [35] => services [36] => shadow [37] => shells [38] => skel )
Output for 7.1.20, 7.2.6
Warning: scandir(): open_basedir restriction in effect. File(/etc/) is not within the allowed path(s): (/tmp:/in) in /in/LHUm7 on line 2 Warning: scandir(/etc/): failed to open dir: Operation not permitted in /in/LHUm7 on line 2 Warning: scandir(): (errno 1): Operation not permitted in /in/LHUm7 on line 2
Output for 7.2.0
Warning: scandir(/etc/): failed to open dir: Permission denied in /in/LHUm7 on line 2 Warning: scandir(): (errno 13): Permission denied in /in/LHUm7 on line 2
Output for 5.0.0 - 7.0.14, 7.1.0
Array ( [0] => . [1] => .. [2] => ImageMagick-6 [3] => ODBCDataSources [4] => arch-release [5] => bash.bash_logout [6] => bash.bashrc [7] => ca-certificates [8] => crypttab [9] => default [10] => environment [11] => fonts [12] => fstab [13] => gai.conf [14] => group [15] => gshadow [16] => hhvm [17] => host.conf [18] => hosts [19] => inputrc [20] => issue [21] => krb5.conf [22] => ld.so.cache [23] => ld.so.conf [24] => ld.so.conf.d [25] => locale.gen [26] => localtime [27] => login.defs [28] => machine-id [29] => mke2fs.conf [30] => motd [31] => mtab [32] => netconfig [33] => nscd.conf [34] => nsswitch.conf [35] => odbc.ini [36] => odbcinst.ini [37] => openldap [38] => pacman.d [39] => pam.d [40] => passwd [41] => php.ini [42] => php_archive.ini [43] => pkcs11 [44] => profile [45] => profile.d [46] => protocols [47] => request-key.conf [48] => request-key.d [49] => resolv.conf [50] => rpc [51] => securetty [52] => security [53] => services [54] => shadow [55] => shells [56] => skel [57] => ssl )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/LHUm7 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: scandir() in /in/LHUm7 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: scandir() in /in/LHUm7 on line 2