Tempnam notice message incorrect
Open
Bug
Category: Streams
Extension: standard
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
<?php
tempnam(sys_get_temp_dir(), '');
// sys_get_temp_dir() = '/tmp'
Resulted in this output:
false
tempnam(): file created in the system's temporary directory
But I expected this output instead:
Correct error message
PHP Version
PHP 8.4.13 (cli) (built: Oct 7 2025 06:01:58) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.13, Copyright (c) Zend Technologies
with Zend OPcache v8.4.13, Copyright (c), by Zend Technologies
Operating System
CentOS Stream release 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.