SplFileInfo::getPathname
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
Gets the path to the file
Description
SplFileInfo::getPathname(): string
Returns the path to the file.
Parameters Parameters
Return Values
The path to the file.
Examples
SplFileInfo::getPathname() example
php
<?php
$info = new SplFileInfo('/usr/bin/php');
var_dump($info->getPathname());
?>The above example will output something similar to:
output
string(12) "/usr/bin/php"See Also
SplFileInfo::getRealPath