xref: /PHP-8.1/ext/standard/tests/file/bug32160.phpt (revision 26dfce7f)
1--TEST--
2Bug #32160 (copying a file into itself leads to data loss)
3--FILE--
4<?php
5$path = __DIR__ . "/bug32160.txt";
6var_dump(copy($path, $path));
7chdir(__DIR__);
8var_dump(copy($path, "bug32160.txt"));
9var_dump(copy("bug32160.txt", "bug32160.txt"));
10?>
11--EXPECT--
12bool(false)
13bool(false)
14bool(false)
15