Code Snippets Php

$path = pathinfo("index.php");
echo $path["dirname"] . "\n";
echo $path["basename"] . "\n";
echo $path["extension"] . "\n";
?>