rename function in php 7 code example Example: rename file php rename('old_filename.txt', 'new_filename.txt');