1--TEST-- 2Test copy() function: usage variations - dir as source (Bug #42111) 3--SKIPIF-- 4<?php 5if(substr(PHP_OS, 0, 3) == "WIN") 6 die("skip Do not run on Windows"); 7?> 8--FILE-- 9<?php 10/* Test copy(): Trying to create a copy of an existing dir */ 11 12$file_path = __DIR__; 13 14echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n"; 15$src_dir = $file_path."/copy_variation12"; 16mkdir($src_dir); 17 18$dest = $file_path."/copy_copy_variation12"; 19 20var_dump( copy($src_dir, $dest) ); 21 22var_dump( file_exists($dest) ); 23 24var_dump( filesize($src_dir) ); 25var_dump( filesize($dest) ); 26 27echo "*** Done ***\n"; 28?> 29--CLEAN-- 30<?php 31rmdir(__DIR__."/copy_variation12"); 32?> 33--EXPECTF-- 34*** Test copy() function: Trying to create a copy of an existing dir *** 35 36Warning: copy(): The first argument to copy() function cannot be a directory in %scopy_variation12.php on line %d 37bool(false) 38bool(false) 39int(%d) 40 41Warning: filesize(): stat failed for %scopy_copy_variation12 in %scopy_variation12.php on line %d 42bool(false) 43*** Done *** 44