Files
php-src/ext/standard/tests/streams/gh17067.phpt
Christoph M. Becker 53b69ba8cf Fix GH-17067: glob:// wrapper doesn't cater to CWD for ZTS builds
`glob(3)` doesn't know the virtual CWD of PHP, so we need to pass an
absolute path for ZTS builds.  In lack of a reusable routine, we copy
the code from `glob()` and adapt as needed.

Closes GH-17074.
2024-12-18 13:02:48 +01:00

23 lines
329 B
PHP

--TEST--
GH-17067 (glob:// wrapper doesn't cater to CWD for ZTS builds)
--FILE--
<?php
$dir = __DIR__ . "/gh17067";
mkdir($dir);
touch("$dir/foo");
chdir($dir);
var_dump(scandir("glob://*"));
?>
--CLEAN--
<?php
$dir = __DIR__ . "/gh17067";
@unlink("$dir/foo");
@rmdir($dir);
?>
--EXPECT--
array(1) {
[0]=>
string(3) "foo"
}