PHP function fnmatch()

Availability in versions: PHP 4.3.0

Match filename against a pattern

Parameters

Parameter Data type Default value Note
$pattern string not The shell wildcard pattern.
$string string not
$flags int null The value of flags can be any combination of the following flags, joined with the binary OR (

Return values

bool

true if there is a match, false otherwise.

Other resources

Official fnmatch documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.