Skip to content

Commit 4647377

Browse files
jdufresneOskarStark
authored andcommitted
Document $suffix argument to tempnam()
1 parent c6956b9 commit 4647377

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/filesystem.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ exception on failure::
286286

287287
// returns a path like : /tmp/prefix_wyjgtF
288288
$filesystem->tempnam('/tmp', 'prefix_');
289+
// returns a path like : /tmp/prefix_wyjgtF.png
290+
$filesystem->tempnam('/tmp', 'prefix_', '.png');
291+
292+
.. versionadded:: 4.4
293+
294+
The option to set a suffix in ``tempnam()`` was introduced in Symfony 4.4.
289295

290296
``dumpFile``
291297
~~~~~~~~~~~~

0 commit comments

Comments
 (0)