'int'], default: '')] $flags,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $magic_database
) {}
/**
* @param $options [optional]
* @param $arg [optional]
*/
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
public function finfo($options, $arg) {}
/**
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)
* Set libmagic configuration options
* @link https://php.net/manual/en/function.finfo-set-flags.php
* @param int $flags
* One or disjunction of more Fileinfo * constants. *
* @return bool TRUE on success or FALSE on failure. */ public function set_flags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Name of a file to be checked. *
* @param int $flags [optional]* One or disjunction of more Fileinfo * constants. *
* @param resource $context [optional]* For a description of contexts, refer to . *
* @return string a textual description of the contents of the * filename argument, or FALSE if an error occurred. */ #[Pure] #[TentativeType] public function file( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE, $context = null ): string|false {} /** * (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)* Content of a file to be checked. *
* @param int $flags [optional]* One or disjunction of more Fileinfo * constants. *
* @param resource $context [optional] * @return string a textual description of the string * argument, or FALSE if an error occurred. */ #[Pure] #[TentativeType] public function buffer( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE, $context = null ): string|false {} } /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* One or disjunction of more Fileinfo * constants. *
* @param string|null $magic_database [optional]* Name of a magic database file, usually something like * /path/to/magic.mime. If not specified, * the MAGIC environment variable is used. If this variable * is not set either, /usr/share/misc/magic is used by default. * A .mime and/or .mgc suffix is added if * needed. *
* @return resource|false a magic database resource on success or FALSE on failure. */ #[LanguageLevelTypeAware(['8.1' => 'finfo|false'], default: 'resource|false')] function finfo_open(int $flags = 0, ?string $magic_database = null) {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
* @return bool TRUE on success or FALSE on failure. */ function finfo_close(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo): bool {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
* @param int $flags* One or disjunction of more Fileinfo * constants. *
* @return bool TRUE on success or FALSE on failure. */ function finfo_set_flags(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, int $flags): bool {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
* @param string $filename* Name of a file to be checked. *
* @param int $flags* One or disjunction of more Fileinfo * constants. *
* @param resource $context [optional]* For a description of contexts, refer to . *
* @return string|false a textual description of the contents of the * filename argument, or FALSE if an error occurred. */ function finfo_file(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $filename, int $flags = 0, $context): string|false {} /** * (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
* @param string $string* Content of a file to be checked. *
* @param int $flags [optional] One or disjunction of more * Fileinfo constants. * @param resource $context [optional] * @return string|false a textual description of the string * argument, or FALSE if an error occurred. */ function finfo_buffer(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {} /** * Detect MIME Content-type for a file * @link https://php.net/manual/en/function.mime-content-type.php * @param string $filename* Path to the tested file. *
* @return string|false the content type in MIME format, like * text/plain or application/octet-stream. */ function mime_content_type($filename): string|false {} /** * No special handling. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_NONE', 0); /** * Follow symlinks. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_SYMLINK', 2); /** * Return the mime type and mime encoding as defined by RFC 2045. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_MIME', 1040); /** * Return the mime type. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_MIME_TYPE', 16); /** * Return the mime encoding of the file. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_MIME_ENCODING', 1024); /** * Look at the contents of blocks or character special devices. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_DEVICES', 8); /** * Return all matches, not just the first. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_CONTINUE', 32); /** * If possible preserve the original access time. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_PRESERVE_ATIME', 128); /** * Don't translate unprintable characters to a \ooo octal * representation. * @link https://php.net/manual/en/fileinfo.constants.php */ define('FILEINFO_RAW', 256); /** * Returns the file extension appropriate for a the MIME type detected in the file. * For types that commonly have multiple file extensions, such as JPEG images, then the return value is multiple extensions speparated by a forward slash e.g.: "jpeg/jpg/jpe/jfif". * For unknown types not available in the magic.mime database, then return value is "???". Available since PHP 7.2.0. * @since 7.2 */ define('FILEINFO_EXTENSION', 2097152); /** * @since 8.2 */ define('FILEINFO_APPLE', 2048); // End of fileinfo v.1.0.5