public function getPathExtension()
    {
        $segments = $this->getPathSegments();
        $filename = array_pop($segments);
        $extension = strrchr($filename, '.');

        if ($extension === false) {
            return '';
        }

        return substr($extension, 1);
    }
public function getPathExtension()
    {
        $segments = $this->getPathSegments();
        $filename = array_pop($segments);
        $extension = strrchr($filename, '.');

        if ($extension === false) {
            return '';
        }

        return substr($extension, 1);
    }
public function getPathExtension ( ) { $ segments = $ this -> getPathSegments ( ) ; $ filename = array_pop ( $ segments ) ; $ extension = strrchr ( $ filename , '.' ) ; if ( $ extension === false ) { return '' ; } return substr ( $ extension , 1 ) ; }
Returns the file extension for the last segment in the path.
@return string The file extension from the last non empty segment
Returns the file extension for the last segment in the path .