PHP path function string realpath ( string $path ) returns the normalized absolute path name
realpath() will detect what $path points to Whether the target file (or folder) actually exists is equivalent to calling file_exists($path).
If the target file exists and is not a symbolic link (called "shortcut" in Windows), the absolute path name of the file is returned and does not contain '/./' or '/../'.
If the target file is a symbolic link or does not exist, realpath() returns FALSE.
PHP path function string dirname (string $path) returns the directory part of the path
dirname() will not detect whether the file (or folder) pointed to by $path actually exists.
Regardless of whether the target file exists, the result will return the absolute path (directory part) of the file.
PHP path function mixed pathinfo ( string $path [, int $options ] ) returns file path information
dirname() will not detect the file (or folder) pointed to by $path Does it really exist?
PHP path function pathinfo() returns an associative array containing path information, including the following array units: dirname, basename, filename, and possible extensions.
The dirname and basename array unit parts are equivalent to the results returned by executing dirname() and basename().
string basename ( string $path [, string $suffix ] ) Returns the file name part of the path
The basename() of the PHP path function will not detect the file (or file) pointed to by $path folder) actually exists.
Regardless of whether the target file exists, the result will return the file name.
If the file name ends with $suffix, the returned file name does not contain the $suffix part.