The filegroup() function returns the group ID of the specified file.
PHP filegroup() Function has the following syntax.
filegroup(filename)
Parameter | Is Required | Description |
---|---|---|
filename | Required. | File to check |
This function returns the group ID on success or FALSE on failure.
The result of this function are cached. Use clearstatcache() to clear the cache.
This function doesn't produce useful results on Windows systems.
Use posix_getgrgid() to convert the group ID to a group name.
Get the file group information
<?php
echo filegroup("test.txt");
?>
The code above generates the following result.