php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43898 tempnam with postfix or extention param
Submitted: 2008-01-20 03:04 UTC Modified: 2018-03-11 14:01 UTC
Votes:4
Avg. Score:3.8 ± 1.6
Reproduced:3 of 4 (75.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: tgkprog at gmail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.2.5 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-01-20 03:04 UTC] tgkprog at gmail dot com
Description:
------------
Would like another paramater to tempnam so we can specify the postfix
thus it can be used as tempnam("/xyz/", "Report_", ".txt")

To which it can return "/xyz/Report_DAKHD.txt"

The default can be the system default or ".tmp"

Note it should even work if the psotfix is something  "_typeA.txt"

example

tempnam("/xyz/", "Report_", "_type_A.txt")

might return  "/xyz/Report_KASD8_type_A.txt"


Its just a postfix not the extention only


Reproduce code:
---------------
Feature request

Expected result:
----------------
A file name in specified folder with requested prefix and postfix (extention)

Actual result:
--------------
n/a (Feature request)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-11 14:01 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Filesystem function related
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Jul 16 10:01:53 2018 UTC