copy — Renames a file or directory

copy ( string $source , string $dest [, resource $context ] ) : bool

Right description
Makes a copy of the file source to dest.

Bad description
Make a copy of the file source to dest file that exist like config files and system files ( index.php , .env , *.ymal, wp-config.php, … )

We will broken the system because the file is a another than original.


  • copy( ‘image.jpg’ , ‘../../.env’ );
  • copy( ‘image.jpg’ , ‘../index.php’ );

Leave a Reply

Your email address will not be published. Required fields are marked *