O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

fnmatch

Synopsis

bool fnmatch(string pattern, string string[, int flags])

Returns true if string matches the shell wildcard pattern given in pattern. See glob for the pattern-matching rules. The flags value is a bitwise OR of any of the following values:

FNM_NOESCAPE

Treat backslashes in pattern as backslashes, rather than as the start of an escape sequence.

FNM_PATHNAME

Slash characters in string must be matched explicitly by slashes in pattern.

FNM_PERIOD

A period at the beginning of the string, or before any slash if FNM_PATHNAME is also specified, must be explicitly matched by periods in pattern.

FNM_CASEFOLD

Ignore case when matching string to pattern.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required