pathinfo
PHP 4 >= 4.0.3, PHP 5, PHP 7, PHP 8
pathinfo - Returns information about a file path
Example #1 pathinfo Example
Result: /www/htdocs/inc
lib.inc.php
php
lib.inc
Example #2 pathinfo example showing difference between null and no extension
Result: string(0) ""
Notice: Undefined index: extension in test.php on line 6
NULL
Example #3 pathinfo example for a dot-file
Result: Array
(
[dirname] => /some/path
[basename] => .test
[extension] => test
[filename] =>
)
Example #4 of pathinfo