3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 0; if ($handle = opendir('.')) { while (false !== ($entry = readdir($handle))) { $count++; } closedir($handle); } $f = fopen("/tmp/test", "w"); while(true) { fwrite($f, "0000000000000000000000000000000000000000"); break; } echo $count;
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: opendir(.): failed to open dir: Permission denied in /in/cCI4b on line 3 0
Output for hhvm-3.10.0 - 3.13.2
Warning: Permission denied in /in/cCI4b on line 3 0
Output for 4.3.0 - 4.3.1
Warning: opendir(.) [http://www.php.net/function.opendir]: failed to open dir: Permission denied in /in/cCI4b on line 3 0