dirname in PHP

Syntax of dirname in PHP string dirname(string path) Returns the directory component of path. This includes everything up to the filename portion (see basename) and doesn’t include the trailing path separator. Example of dirname in PHP