The PHP realpath_cache_size() function returns realpath cache size.

				
					<?php
// rename directory
rename('images', 'my-images');
// rename file
rename('/test/file.txt', '/home/docs/my-file.txt');
?>
				
			

Output

				
					// renames a file and a directory
				
			

Syntax

				
					rename(old, new, context)
				
			

Parameters

ParameterDescription
oldSpecifies the file or directory to be renamed (required)
newSpecifies the new name for the file or directory (required)
contextSpecifies the context of the file handle; context is a set of options that can modify the behavior of a stream