3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if ($dh = opendir('/etc/apache2/')) { echo "Directory handle: $handle\n"; echo "Entries:\n"; /* This is the correct way to loop over the directory. */ while (false !== ($entry = readdir($dh))) { echo "$entry\n"; } closedir($dh); }
Output for 4.3.2 - 7.2.0, 7.3.0alpha1
Warning: opendir(/etc/apache2/): failed to open dir: No such file or directory in /in/unvRv on line 3
Output for 7.2.6
Warning: opendir(): open_basedir restriction in effect. File(/etc/apache2/) is not within the allowed path(s): (/tmp:/in) in /in/unvRv on line 3 Warning: opendir(/etc/apache2/): failed to open dir: Operation not permitted in /in/unvRv on line 3
Output for 4.3.0 - 4.3.1
Warning: opendir(/etc/apache2/) [http://www.php.net/function.opendir]: failed to open dir: No such file or directory in /in/unvRv on line 3