3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $files = scandir('/'); foreach ($files as $f) { echo substr(sprintf('%o', fileperms('/'.$f)), -4); }
Output for 5.5.24 - 7.1.0
Warning: scandir(/): failed to open dir: Permission denied in /in/ol7pY on line 2 Warning: scandir(): (errno 13): Permission denied in /in/ol7pY on line 2 Warning: Invalid argument supplied for foreach() in /in/ol7pY on line 3
Output for 5.4.41 - 5.4.45
075507550755075507550755075507510755075507550755055507500755075507550555177707550755
Output for 5.4.34 - 5.4.40
075507550751075507550751075503510755075507550755055507500311075107550555177707510751
Output for 5.3.28 - 5.3.29, 5.4.21 - 5.4.32
075507550751075507550751075507510755075507550755055507500311075107550555177707510751
Output for 5.0.0 - 5.3.27, 5.4.0 - 5.4.20
075507550751075507550751075507510755075507550755055007500700075107550555177707510751
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/ol7pY 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/ol7pY 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/ol7pY on line 2