3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if ($handle = opendir('/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions')) { echo "Directory handle: $handle\n"; echo "Entries:\n"; /* This is the correct way to loop over the directory. */ while (false !== ($entry = readdir($handle))) { echo "$entry\n"; } closedir($handle); }
based on d4rWJ
Output for 5.6.0 - 5.6.38, 7.0.0 - 7.3.0
Warning: opendir(): open_basedir restriction in effect. File(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions) is not within the allowed path(s): (/tmp:/in:/etc) in /in/iJPK95 on line 3 Warning: opendir(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions): failed to open dir: Operation not permitted in /in/iJPK95 on line 3
Output for hhvm-3.22.0
Warning: No such file or directory in /in/iJPK95 on line -1
Output for hhvm-3.10.1 - 3.21.3
Warning: No such file or directory in /in/iJPK95 on line 3
Output for 4.3.2 - 5.5.38
Warning: opendir(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions): failed to open dir: No such file or directory in /in/iJPK95 on line 3
Output for 4.3.0 - 4.3.1
Warning: opendir(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions) [http://www.php.net/function.opendir]: failed to open dir: No such file or directory in /in/iJPK95 on line 3