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/no-debug-non-zts-20121212')) { 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 iJPK95
Output for 5.4.40 - 7.2.0
Warning: opendir(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212): failed to open dir: No such file or directory in /in/qbYqu on line 3
Output for 5.3.0 - 5.4.39
Directory handle: Resource id #5 Entries: . .. vld.so
Output for 5.2.3 - 5.2.17
Directory handle: Resource id #4 Entries: . .. vld.so
Output for 4.3.1 - 5.2.2
Directory handle: Resource id #1 Entries: . .. vld.so
Output for 4.3.0
Warning: opendir(/home/sjon/phpshell/root/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212) [http://www.php.net/function.opendir]: failed to open dir: No such file or directory in /in/qbYqu on line 3