bug42364.phpt 474 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #42364 (Crash when using getRealPath with DirectoryIterator)
  3. --FILE--
  4. <?php
  5. $it = new DirectoryIterator(dirname(__FILE__));
  6. $count = 0;
  7. foreach ($it as $e) {
  8. $count++;
  9. $type = gettype($e->getRealPath());
  10. if ($type != "string" && $type != "unicode") {
  11. echo $e->getFilename(), " is a ", gettype($e->getRealPath()), "\n";
  12. }
  13. }
  14. if ($count > 0) {
  15. echo "Found $count entries!\n";
  16. }
  17. ?>
  18. ===DONE===
  19. --EXPECTF--
  20. Found %i entries!
  21. ===DONE===