3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "</textarea>"; if($a = opendir(".")){ while($b = readdir($a)){ if(is_file($b)){ if(is_writable($b)){ echo "File ".$b." is writable\n"; } else { echo "File ".$b." is not writable\n"; } } elseif(is_dir($b)){ if(is_writable($b)){ echo "DIR ".$b." is writable\n"; } else { echo "DIR ".$b." is not writable\n"; } } } } else { echo "Can't opendir()"; } ?>
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
</textarea> Warning: opendir(.): failed to open dir: Permission denied in /in/ceP4d on line 3 Can't opendir()
Output for hhvm-3.10.0 - 3.12.0
</textarea> Warning: Permission denied in /in/ceP4d on line 3 Can't opendir()
Output for 4.3.0 - 4.3.1
</textarea> Warning: opendir(.) [http://www.php.net/function.opendir]: failed to open dir: Permission denied in /in/ceP4d on line 3 Can't opendir()