original_string: public static function split_fileref($fileref) {
  		$reg = array();
  		if (preg_match('/(.*\/)(.*)$/', $fileref, $reg)) {
  			$info['path'] = $reg[1];
  			$info['file'] = $reg[2];
  		} else {
  			$info['path'] = '';
  			$info['file'] = $fileref;
  		}
  
  		$reg = '';
  		if (!is_dir($fileref) && preg_match('/(.*)\.([^\.]*$)/', $info['file'], $reg)) {
  			$info['filebody'] = $reg[1];
  			$info['fileext'] = strtolower($reg[2]);
  			$info['realFileext'] = $reg[2];
  		} else {
  			$info['filebody'] = $info['file'];
  			$info['fileext'] = '';
  		}
  		reset($info);
  		return $info;
  	}
code: public static function split_fileref($fileref) {
  		$reg = array();
  		if (preg_match('/(.*\/)(.*)$/', $fileref, $reg)) {
  			$info['path'] = $reg[1];
  			$info['file'] = $reg[2];
  		} else {
  			$info['path'] = '';
  			$info['file'] = $fileref;
  		}
  
  		$reg = '';
  		if (!is_dir($fileref) && preg_match('/(.*)\.([^\.]*$)/', $info['file'], $reg)) {
  			$info['filebody'] = $reg[1];
  			$info['fileext'] = strtolower($reg[2]);
  			$info['realFileext'] = $reg[2];
  		} else {
  			$info['filebody'] = $info['file'];
  			$info['fileext'] = '';
  		}
  		reset($info);
  		return $info;
  	}
code_tokens: public static function split_fileref ( $ fileref ) { $ reg = array ( ) ; if ( preg_match ( '/(.*\/)(.*)$/' , $ fileref , $ reg ) ) { $ info [ 'path' ] = $ reg [ 1 ] ; $ info [ 'file' ] = $ reg [ 2 ] ; } else { $ info [ 'path' ] = '' ; $ info [ 'file' ] = $ fileref ; } $ reg = '' ; if ( ! is_dir ( $ fileref ) && preg_match ( '/(.*)\.([^\.]*$)/' , $ info [ 'file' ] , $ reg ) ) { $ info [ 'filebody' ] = $ reg [ 1 ] ; $ info [ 'fileext' ] = strtolower ( $ reg [ 2 ] ) ; $ info [ 'realFileext' ] = $ reg [ 2 ] ; } else { $ info [ 'filebody' ] = $ info [ 'file' ] ; $ info [ 'fileext' ] = '' ; } reset ( $ info ) ; return $ info ; }
docstring: Splits a reference to a file in 5 parts
  
  @param string $fileref Filename/filepath to be analysed
  @return array Contains keys [path], [file], [filebody], [fileext], [realFileext]
docstring_tokens: Splits a reference to a file in 5 parts