On Mon, Nov 26, 2012 at 4:21 PM, Sara Golemon <poll...@php.net> wrote:
> https://wiki.php.net/rfc/request-tempnam > > Just a bit of hand-holding for those who don't remember to clean up > their messes. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > While I don't think there's anything wrong with this feature, I'm also wondering if maybe people that need this should be using tmpfile() instead? I understand they do slightly different things (in that one gives you an actual file name the other gives you a file handle), but I normally don't need or care about the file name if I expect my temporary file to live and die with the request. Things I usually use tempnam() for are usually things that get born with the request and don't necessarily die with it, like binary storage that's tied to the session (temporary file uploads that might be moved later or deleted). But I don't see any harm in adding this either.