classes/phing/system/io/UnixFileSystem.php
public function prefixLength($pathname)
    {
        if (strlen($pathname) === 0) {
            return 0;
        }

        if (class_exists('Phar', false) && method_exists('Phar', 'running')) {
            $phar = Phar::running();
            $pharAlias = 'phar://' . Phing::PHAR_ALIAS;

            if ($phar && strpos($pathname, $phar) === 0) {
                return strlen($phar);
            }

            if ($phar && strpos($pathname, $pharAlias) === 0) {
                return strlen($pharAlias);
            }
        }

        return (($pathname{0} === '/') ? 1 : 0);
    }
public function prefixLength($pathname)
    {
        if (strlen($pathname) === 0) {
            return 0;
        }

        if (class_exists('Phar', false) && method_exists('Phar', 'running')) {
            $phar = Phar::running();
            $pharAlias = 'phar://' . Phing::PHAR_ALIAS;

            if ($phar && strpos($pathname, $phar) === 0) {
                return strlen($phar);
            }

            if ($phar && strpos($pathname, $pharAlias) === 0) {
                return strlen($pharAlias);
            }
        }

        return (($pathname{0} === '/') ? 1 : 0);
    }
public function prefixLength ( $ pathname ) { if ( strlen ( $ pathname ) === 0 ) { return 0 ; } if ( class_exists ( 'Phar' , false ) && method_exists ( 'Phar' , 'running' ) ) { $ phar = Phar :: running ( ) ; $ pharAlias = 'phar://' . Phing :: PHAR_ALIAS ; if ( $ phar && strpos ( $ pathname , $ phar ) === 0 ) { return strlen ( $ phar ) ; } if ( $ phar && strpos ( $ pathname , $ pharAlias ) === 0 ) { return strlen ( $ pharAlias ) ; } } return ( ( $ pathname { 0 } === '/' ) ? 1 : 0 ) ; }
Compute the length of the pathname string's prefix.  The pathname
string must be in normal form.

@param string $pathname

@return int
Compute the length of the pathname string s prefix . The pathname string must be in normal form .