UK[ˌri:ˈneɪm] US[ˌriːˈneɪm]

vt. Rename..., change its name

Third person singular: renames Present participle: renaming Past tense: renamed Past participle: renamed

php rename() function syntax

Function:Rename files or directories.

Syntax:rename(oldname,newname,context)

##Parameters:

Parameters Description oldname Required. Specifies the file or directory to be renamed. newname Required. Specifies the new name of the file or directory. context Optional. Specifies the environment for a file handle. context is a set of options that modify the behavior of the stream.

Note:The encapsulation protocol used in oldname must match the one used in newname.

php rename() function example


Run instance »

Click the "Run instance" button to view the online instance