fnmatch_maxpathlen.phpt 561 B

123456789101112131415161718
  1. --TEST--
  2. Test fnmatch() function : warning filename or pattern exceeds maxpathlen
  3. --SKIPIF--
  4. <?php
  5. if (!function_exists('fnmatch')) die('skip fnmatch() function is not available');
  6. ?>
  7. --FILE--
  8. <?php
  9. $longstring = str_pad('blah', PHP_MAXPATHLEN);
  10. var_dump(fnmatch('blah', $longstring));
  11. var_dump(fnmatch($longstring, 'blah'));
  12. ?>
  13. --EXPECTF--
  14. Warning: fnmatch(): Filename exceeds the maximum allowed length of %d characters in %s on line %d
  15. bool(false)
  16. Warning: fnmatch(): Pattern exceeds the maximum allowed length of %d characters in %s on line %d
  17. bool(false)