src/View/Helper/UrlComparerTrait.php
public function compareUrls($lhs, $rhs = null, $parts = []) {
        if ($rhs == null) {
            $rhs = Router::url();
        }
        $lhs = $this->_normalize($lhs, $parts);
        $rhs = $this->_normalize($rhs);
        return $lhs !== null && $rhs !== null && strpos($rhs, $lhs) === 0;
    }
public function compareUrls($lhs, $rhs = null, $parts = []) {
        if ($rhs == null) {
            $rhs = Router::url();
        }
        $lhs = $this->_normalize($lhs, $parts);
        $rhs = $this->_normalize($rhs);
        return $lhs !== null && $rhs !== null && strpos($rhs, $lhs) === 0;
    }
public function compareUrls ( $ lhs , $ rhs = null , $ parts = [ ] ) { if ( $ rhs == null ) { $ rhs = Router :: url ( ) ; } $ lhs = $ this -> _normalize ( $ lhs , $ parts ) ; $ rhs = $ this -> _normalize ( $ rhs ) ; return $ lhs !== null && $ rhs !== null && strpos ( $ rhs , $ lhs ) === 0 ; }
Check if first URL is a parent of the right URL, without regards to query
parameters or hash.

@param string|array $lhs First URL to compare.
@param string|array $rhs Second URL to compare. Default is current URL (`Router::url()`).

@return bool `true` if both URL match, `false` otherwise.
Check if first URL is a parent of the right URL without regards to query parameters or hash .