Suggestion: Add optional suffix to tempnam()

From: Date: Sat, 11 Jan 2014 19:15:28 +0000
Subject: Suggestion: Add optional suffix to tempnam()
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

I'd like to propose adding an optional $suffix to tempnam(). Please find
attached a patch that implements this against current master.

Help with this would be appreciated, especially if I did something
wrong, since it's my first php-src patch.

As you might expect, it can be used like
  echo tempnam('.', 'abc-', '.png');

We discussed the usecase lately in the TYPO3-community where there are
some cases where external tools would like to have a proper suffix for
temporary files. They currently use their own "workaround" to have a
tempnam() with suffix.


Kind regards,
 Stefan


Attachment: [text/x-patch] tempnam-add-suffix.patch

Thread (11 messages)

« previous php.internals (#71071) next »