3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php version_compare(PHP_VERSION, '5.3.0', '>=') or die('SKIPPED'); $dir = new RecursiveDirectoryIterator('/tmp'); $recursive = new RecursiveIteratorIterator($dir); $recursive->setMaxDepth(0); foreach ($recursive as $fileinfo) { printf("%s %s\n", $fileinfo, $recursive->isDot() ? "OMG A DOT!!" : ""); }
Output for 5.3.23 - 5.3.29, 5.4.5 - 5.6.28, 7.0.0 - 7.1.0
/tmp/. OMG A DOT!! /tmp/.. OMG A DOT!!
Output for hhvm-3.12.0
/tmp/. OMG A DOT!! /tmp/.. OMG A DOT!! /tmp/perf-2076.map
Output for hhvm-3.10.0
/tmp/. OMG A DOT!! /tmp/.. OMG A DOT!! /tmp/perf-2088.map
Output for 5.3.0 - 5.3.22, 5.4.0 - 5.4.4
Output for 4.3.0 - 5.2.17
SKIPPED