rename
rename($path,$new_path); - this function is used to rename the specified file
The function accepts parameters as input:
$path – path to the file to rename (string). It can be either absolute or relative (relative to the script folder).
$new_path – new file name (file path) (string). It can be either absolute or relative (relative to the script folder).
After testing, the function returns the result of its work to the script :
true – successfully renamed (boolean)false – operation failed (boolean)