3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = '/usr/share'; $files1 = scandir($dir); print_r($files1);
Output for 5.6.28, 7.0.14 - 7.1.0
Array ( [0] => . [1] => .. [2] => ImageMagick-6 [3] => X11 [4] => aclocal [5] => bash-completion [6] => ca-certificates [7] => classes [8] => common-lisp [9] => cracklib [10] => dict [11] => doc [12] => emacs [13] => et [14] => gdb [15] => gettext [16] => gir-1.0 [17] => glib-2.0 [18] => gperf [19] => graphite2 [20] => gtk-doc [21] => hhvm [22] => i18n [23] => iana-etc [24] => icu [25] => info [26] => keyutils [27] => libalpm [28] => libtool [29] => licenses [30] => locale [31] => makepkg-template [32] => man [33] => misc [34] => p11-kit [35] => perl5 [36] => readline [37] => ss [38] => tabset [39] => terminfo [40] => texinfo [41] => xcb [42] => zoneinfo )
Output for 5.0.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.7
Array ( [0] => . [1] => .. [2] => ImageMagick-6 [3] => X11 [4] => aclocal [5] => bash-completion [6] => ca-certificates [7] => classes [8] => common-lisp [9] => cracklib [10] => dict [11] => doc [12] => emacs [13] => et [14] => gettext [15] => gir-1.0 [16] => glib-2.0 [17] => gperf [18] => graphite2 [19] => gtk-doc [20] => hhvm [21] => i18n [22] => iana-etc [23] => icu [24] => info [25] => keyutils [26] => libtool [27] => licenses [28] => locale [29] => makepkg-template [30] => man [31] => misc [32] => p11-kit [33] => perl5 [34] => readline [35] => ss [36] => tabset [37] => terminfo [38] => texinfo [39] => xcb [40] => zoneinfo [41] => zsh )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/lUKT0 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: scandir() in /in/lUKT0 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: scandir() in /in/lUKT0 on line 3