1--TEST--
2Test copy() function: usage variations - identical names
3--FILE--
4<?php
5/* Test copy(): Try copying source file to desntination file, where destination file name is identical to source name */
6
7$file_path = __DIR__;
8
9echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n";
10$file = $file_path."/copy_variation10.tmp";
11$file_handle =  fopen($file, "w");
12fwrite($file_handle, str_repeat("Hello2world...\n", 100));
13fclose($file_handle);
14
15var_dump( copy($file, $file) );
16var_dump( file_exists($file) );
17var_dump( filesize($file) );
18
19echo "*** Done ***\n";
20?>
21--CLEAN--
22<?php
23unlink(__DIR__."/copy_variation10.tmp");
24?>
25--EXPECT--
26*** Test copy(): Trying to create a copy of file with the same source name ***
27bool(false)
28bool(true)
29int(1500)
30*** Done ***
31