3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = dir('/tmp'); while ($v = $d->read()) { echo "$v\n"; echo "\n-----------------------------------------------------------------\n"; readfile('/tmp/' . $v); echo "\n-----------------------------------------------------------------\n"; } $d->close();
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
. ----------------------------------------------------------------- ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: readfile(/tmp/..): failed to open stream: Permission denied in /in/RKK2u on line 6 -----------------------------------------------------------------
Output for hhvm-3.12.0
. ----------------------------------------------------------------- ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: Permission denied in /in/RKK2u on line 6 ----------------------------------------------------------------- perf-10915.map ----------------------------------------------------------------- ----------------------------------------------------------------- perf-10914.map ----------------------------------------------------------------- -----------------------------------------------------------------
Output for hhvm-3.10.0
. ----------------------------------------------------------------- ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: Permission denied in /in/RKK2u on line 6 -----------------------------------------------------------------