How can I use the copy function to copy a file in PHP? Example code: - Biz Tech

How can I use the copy function to copy a file in PHP? Example code:

$file = "/path/to/file.txt";
$new_file = "/path/to/new_file.txt";

copy($file, $new_file);