public static function getFileName( $path, $includeExtension = true )
	{
		$option = ($includeExtension)?PATHINFO_BASENAME:PATHINFO_FILENAME;
		return pathinfo($path, $option);
	}
public static function getFileName( $path, $includeExtension = true )
	{
		$option = ($includeExtension)?PATHINFO_BASENAME:PATHINFO_FILENAME;
		return pathinfo($path, $option);
	}
public static function getFileName ( $ path , $ includeExtension = true ) { $ option = ( $ includeExtension ) ? PATHINFO_BASENAME : PATHINFO_FILENAME ; return pathinfo ( $ path , $ option ) ; }
Extracts filename from path, with or without extension

You can optionally specify if you want extensino to be included
Defaults to extension included

@param string $path from wich filename will be extracted
@param boolean $includeExtension flag for including extension
@return string extracted filename
Extracts filename from path with or without extension