SplFileInfo::getOwner

(PHP 5 >= 5.1.2, PHP 7)
Gets the owner of the file
public int SplFileInfo::getOwner ( void )

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

Returns:

The owner id in numerical format.

Exception:

Throws RuntimeException on error.

Examples:
SplFileInfo::getOwner() example
<?php
$info = new SplFileInfo('file.txt');
print_r(posix_getpwuid($info->getOwner()));
?>

See also:

posix_getpwuid() -

SplFileInfo::getGroup() -

doc_php
2016-02-24 16:20:13
Comments
Leave a Comment

Please login to continue.