SplFileInfo::getGroup

(PHP 5 >= 5.1.2, PHP 7)
Gets the file group
public int SplFileInfo::getGroup ( void )

Gets the file group. The group ID is returned in numerical format.

Returns:

The group id in numerical format.

Exception:

Throws RuntimeException on error.

Examples:
SplFileInfo::getGroup() example
1
2
3
4
<?php
$info new SplFileInfo(__FILE__);
print_r(posix_getgrgid($info->getGroup()));
?>

The above example will output something similar to:

See also:

posix_getgrgid() -

doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.