PHP 8.1.2 Released!

finfo_set_flags

finfo::set_flags

(PHP >= 5.3.0, PHP 7, PHP 8, PECL fileinfo >= 0.1.0)

finfo_set_flags -- finfo::set_flagsSet libmagic configuration options

Description

Procedural style

finfo_set_flags(finfo $finfo, int $flags): bool

Object-oriented style

public finfo::set_flags(int $flags): bool

This function sets various Fileinfo options. Options can be set also directly in finfo_open() or other Fileinfo functions.

Parameters

finfo

An finfo instance, returned by finfo_open().

flags

One or disjunction of more Fileinfo constants.

Return Values

Returns true on success or false on failure.

Changelog

Version Description
8.1.0 The finfo parameter expects an finfo instance now; previously, a resource was expected.
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top