public function splitFilename($filename, $keepDot = false) {
		$position = strrpos($filename, '.');
		if ($position === false) {
			$extension = '';
		} else {
			$extension = substr($filename, $position, strlen($filename));
			$filename = substr($filename, 0, $position);
			if ($keepDot === false) {
				$extension = substr($extension, 1);
			}
		}

		return compact('filename', 'extension');
	}
public function splitFilename($filename, $keepDot = false) {
		$position = strrpos($filename, '.');
		if ($position === false) {
			$extension = '';
		} else {
			$extension = substr($filename, $position, strlen($filename));
			$filename = substr($filename, 0, $position);
			if ($keepDot === false) {
				$extension = substr($extension, 1);
			}
		}

		return compact('filename', 'extension');
	}
public function splitFilename ( $ filename , $ keepDot = false ) { $ position = strrpos ( $ filename , '.' ) ; if ( $ position === false ) { $ extension = '' ; } else { $ extension = substr ( $ filename , $ position , strlen ( $ filename ) ) ; $ filename = substr ( $ filename , 0 , $ position ) ; if ( $ keepDot === false ) { $ extension = substr ( $ extension , 1 ) ; } } return compact ( 'filename' , 'extension' ) ; }
Splits the filename in name and extension.

@param string $filename Filename to split in name and extension.
@param bool|bool $keepDot Keeps the dot in front of the extension.
@return array
Splits the filename in name and extension .