3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dir = '/tmp'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2);
Output for 5.3.0 - 5.6.30, 7.0.0 - 7.2.0
Array ( [0] => . [1] => .. ) Array ( [0] => .. [1] => . )
Output for hhvm-3.17.3
Array ( [0] => . [1] => .. [2] => perf-18274.map ) Array ( [0] => perf-18274.map [1] => .. [2] => . )
Output for hhvm-3.15.4
Array ( [0] => . [1] => .. [2] => perf-18280.map ) Array ( [0] => perf-18280.map [1] => .. [2] => . )
Output for hhvm-3.13.2
Array ( [0] => . [1] => .. [2] => perf-18299.map ) Array ( [0] => perf-18299.map [1] => .. [2] => . )
Output for hhvm-3.12.14

Process exited with code 137.
Output for hhvm-3.11.1
Array ( [0] => . [1] => .. [2] => perf-18318.map ) Array ( [0] => perf-18318.map [1] => .. [2] => . )
Output for hhvm-3.10.1
Array ( [0] => . [1] => .. [2] => perf-18326.map ) Array ( [0] => perf-18326.map [1] => .. [2] => . )