Replacement for dirname(__FILE__)

<?php
echo dirname(__FILE__);
echo 
"<br>\n";
echo 
__DIR__;
?>
Output
/local/Web/sites/talks.php.net
/local/Web/sites/talks.php.net