finfo_file()
function finfo_file(finfo $finfo, string $filename, int $flags = 0, ?resource $context = null): string|false
Identifies the type and encoding of a file or stream URL.
Parameters:
$finfo(finfo)$filename(string)$flags(int), default0, optional$context(?resource), defaultnull, optional
Returns: string|false
Availability
| Compiled (AOT) | Magician (eval) |
|---|---|
| Available | Available |
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how finfo_file is implemented in the compiler, see the internals page.