3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = '/var/tmp'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2); ?> ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Array ( [0] => . [1] => .. [2] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [3] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [4] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [5] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [6] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [7] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [8] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [9] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [10] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [11] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 ) Array ( [0] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [1] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [2] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [3] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [4] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [5] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [6] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [7] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [8] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [9] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [10] => .. [11] => . ) ?>
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/Su8ss 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/Su8ss 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/Su8ss on line 3