|  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: 2021-01-13 15:09 UTC
Avg. Score:3.6 ± 1.5
Reproduced:3 of 4 (75.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: tgkprog at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: Filesystem function related
PHP Version: 5.2.5 OS: linux
Private report: No CVE-ID: None
 [2008-01-20 03:04 UTC] tgkprog at gmail dot com
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"


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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-11 14:01 UTC]
-Package: Feature/Change Request +Package: Filesystem function related
 [2021-01-13 15:09 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2021-01-13 15:09 UTC]
Duplicate of request #37613.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 09:01:29 2024 UTC