Skip to content

Tempnam notice message incorrect #20189

@RV7PR

Description

@RV7PR

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions