I revently added a new PHP function php_get_tmpdir() to return the path of the directory used by PHP to store temporary files (based on this feature request on bugs.php.net).
As i have received slight positive feedback on this on the internals mailing list and in private and as no objections came up so far i have now commited this function to CVS HEAD and added a documentation page for it to the manual.
Update: we're still discussing the final name and whether this will be in 5.2, too. Stay tuned ...