← All built-ins / glob()
glob()
glob(string $s): mixed
Parameters
| Name | Type | Description |
|---|---|---|
| $pattern | string | wildcard pattern like "*.hphp" |
Return value
Matching paths as an array (empty when nothing matches).
Example
$f = glob("tests/positive/*.hphp");
echo count($f) >= 5 ? "found-tests" : "none";found-tests