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