protected function scanTo($path, $scope)
    {
        if (!($sub = array_shift($path)) || !isset($scope[$sub])) {
            return null;
        }

        if (!$path) {
            return $scope[$sub];
        }

        return $this->scanTo($path, $scope[$sub]);
    }
protected function scanTo($path, $scope)
    {
        if (!($sub = array_shift($path)) || !isset($scope[$sub])) {
            return null;
        }

        if (!$path) {
            return $scope[$sub];
        }

        return $this->scanTo($path, $scope[$sub]);
    }
protected function scanTo ( $ path , $ scope ) { if ( ! ( $ sub = array_shift ( $ path ) ) || ! isset ( $ scope [ $ sub ] ) ) { return null ; } if ( ! $ path ) { return $ scope [ $ sub ] ; } return $ this -> scanTo ( $ path , $ scope [ $ sub ] ) ; }
Scan to a given value.

@param string $path  The path.

@param array  $scope The current array scope.

@return null|array|string|int
Scan to a given value .