1--TEST-- 2Test fnmatch() function: Basic functionality 3--SKIPIF-- 4<?php 5if (!function_exists('fnmatch')) 6 die("skip fnmatch() function is not available"); 7?> 8--FILE-- 9<?php 10 11echo "*** Testing fnmatch() with file ***\n"; 12$file = basename(__FILE__); 13 14var_dump( fnmatch("*.php", $file) ); 15var_dump( fnmatch("*.p*p", $file) ); 16var_dump( fnmatch("*.p*", $file) ); 17var_dump( fnmatch("*", $file) ); 18var_dump( fnmatch("**", $file) ); 19var_dump( fnmatch("*.phpt", $file) ); 20 21echo "*** Testing fnmatch() with other than file ***\n"; 22var_dump( fnmatch(100, 100) ); 23var_dump( fnmatch("string", "string") ); 24var_dump( fnmatch(TRUE, TRUE) ); 25var_dump( fnmatch(FALSE, FALSE) ); 26 27echo "\n*** Done ***\n"; 28?> 29--EXPECT-- 30*** Testing fnmatch() with file *** 31bool(true) 32bool(true) 33bool(true) 34bool(true) 35bool(true) 36bool(false) 37*** Testing fnmatch() with other than file *** 38bool(true) 39bool(true) 40bool(true) 41bool(true) 42 43*** Done *** 44