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/error-output.txt'); echo "\n-----------------------------------------------------------------\n"; } $d->close();
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
. ----------------------------------------------------------------- Warning: readfile(/tmp/error-output.txt): failed to open stream: No such file or directory in /in/0Dlc1 on line 6 ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: readfile(/tmp/error-output.txt): failed to open stream: No such file or directory in /in/0Dlc1 on line 6 -----------------------------------------------------------------
Output for hhvm-3.12.0
. ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 ----------------------------------------------------------------- perf-24413.map ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 -----------------------------------------------------------------
Output for hhvm-3.10.0
. ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 ----------------------------------------------------------------- .. ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 ----------------------------------------------------------------- perf-24425.map ----------------------------------------------------------------- Warning: No such file or directory in /in/0Dlc1 on line 6 -----------------------------------------------------------------
Output for 4.4.3 - 5.2.2
. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> ----------------------------------------------------------------- .. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> -----------------------------------------------------------------
Output for 4.3.2 - 4.4.2
. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt): failed to open stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> ----------------------------------------------------------------- .. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt): failed to open stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> -----------------------------------------------------------------
Output for 4.3.0 - 4.3.1
. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt) [<a href='http://www.php.net/function.readfile'>function.readfile</a>]: failed to create stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> ----------------------------------------------------------------- .. ----------------------------------------------------------------- <br /> <b>Warning</b>: readfile(/tmp/error-output.txt) [<a href='http://www.php.net/function.readfile'>function.readfile</a>]: failed to create stream: No such file or directory in <b>/in/0Dlc1</b> on line <b>6</b><br /> -----------------------------------------------------------------