PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular

glob

Tags: PHP 5.x PHP 7.x PHP 8.x

glob — Find pathnames matching a pattern.

Description

glob(
    string $pattern,
int $flags = 0
): array|false
The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells.

Parameters

pattern
string
flags
int

Return Values

Returns an array containing the matched files/directories, an empty array if no file matched or false on error.

glob - New snippets