- var_dump: documentation ( source)
- fnmatch: documentation ( source)
<?php
var_dump(fnmatch('path/*','path/index.php')); // true
var_dump(fnmatch('path/*','path2/')); // false
var_dump(fnmatch( 'path2/*.php','path2/test.php')); // true