PHP filegroup() Function

Definition and Usage

The filegroup() function returns the group ID of the specified file.

If successful, it returns the ID of the group to which the specified file belongs. If failed, it returns false and an E_WARNING level error.

Returns the group ID in numeric format.

Syntax

filegroup(filename)
Parameter Description
filename Required. Specifies the file to be checked.

Tips and Comments

Tip:The result of this function will be cached. Please use clearstatcache() to clear the cache.

Tip:Please use posix_getgrgid() to convert group ID to group name.

Example

<?php
echo filegroup("test.txt");
?>