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) ); 26var_dump( fnmatch(NULL, NULL) ); 27 28echo "\n*** Done ***\n"; 29?> 30--EXPECT-- 31*** Testing fnmatch() with file *** 32bool(true) 33bool(true) 34bool(true) 35bool(true) 36bool(true) 37bool(false) 38*** Testing fnmatch() with other than file *** 39bool(true) 40bool(true) 41bool(true) 42bool(true) 43bool(true) 44 45*** Done *** 46