PHP filegroup() Function
In this chapter you will learn:
- Definition for PHP filegroup() Function
- Syntax for PHP filegroup() Function
- Parameter for PHP filegroup() Function
- Return for PHP filegroup() Function
- Note for PHP filegroup() Function
- Example - Get the file group information
Definition
The filegroup() function returns the group ID of the specified file.
Syntax
PHP filegroup() Function has the following syntax.
filegroup(filename)
Parameter
Parameter | Is Required | Description |
---|---|---|
filename | Required. | File to check |
Return
This function returns the group ID on success or FALSE on failure.
Note
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.
Example
Get the file group information
<?php
echo filegroup("test.txt");
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP fileinode() Function
- Syntax for PHP fileinode() Function
- Parameter for PHP fileinode() Function
- Return for PHP fileinode() Function
- Note for PHP filegroup() Function
- Example - PHP filegroup() Function
Home » PHP Tutorial » PHP File Functions