If you pass a variable such as
foo.php?file=frontpage
and you run $PHP_SELF on it
it returns
foo.php?file=frontpage
so if you have the setup:
echo "$PHP_SELF?file=frontpage";
for a link,
and you keep cliking that link, you get:
$PHP_SELF?file=frontpage
$PHP_SELF?file=frontpagefile=frontpage
$PHP_SELF?file=frontpagefile=frontpagefile=frontpage
etc. Which messes things up.
Also, if you use $PHP_SELF inside a function, it brings up a low-level error saying $PHP_SELF doesn't exist. Which is just kinda annoying when your trying to debug something.