3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "f**k by CAI\n\n"; 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 - 7.1.0
f**k by CAI Warning: opendir(.): failed to open dir: Permission denied in /in/19uP6 on line 3 Can't opendir()
Output for 4.3.0 - 4.3.1
f**k by CAI Warning: opendir(.) [http://www.php.net/function.opendir]: failed to open dir: Permission denied in /in/19uP6 on line 3 Can't opendir()