3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(scandir('/var/'));
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(15) { [0]=> string(1) "." [1]=> string(2) ".." [2]=> string(5) "cache" [3]=> string(2) "db" [4]=> string(5) "empty" [5]=> string(5) "games" [6]=> string(3) "lib" [7]=> string(5) "local" [8]=> string(4) "lock" [9]=> string(3) "log" [10]=> string(4) "mail" [11]=> string(3) "opt" [12]=> string(3) "run" [13]=> string(5) "spool" [14]=> string(3) "tmp" }
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/GLJM4 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/GLJM4 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/GLJM4 on line 2