xref: /PHP-8.3/ext/standard/tests/file/bug42560.phpt (revision 5d31ee30)
1--TEST--
2Bug #42560 Empty directory argument to tempnam yields open_basedir problems
3--FILE--
4<?php
5$tmpdir = sys_get_temp_dir();
6ini_set('open_basedir', $tmpdir);
7$tempnam = tempnam('', 'test');
8var_dump($tempnam !== false);
9var_dump(file_exists($tempnam));
10
11if (file_exists($tempnam)) {
12    unlink($tempnam);
13}
14?>
15--EXPECT--
16bool(true)
17bool(true)
18