php / php/php-src

Tempnam notice message incorrect

Open
#20,189 3 comments 0 reactions 1 assignee View on GitHub

@ndossche is already working on this.

Since Oct 16, 2025.

  • #20191 by @ndossche — 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.