If intervals don't overlaps than returned Interval will be "empty" - check via Interval::isEmpty() method

@param Interval $other
@return static
516001
public function intersection(Interval $other)
	{
		if ($this->isContaining($other)) {
			return $other;

		} elseif ($other->isContaining($this)) {
			return $this;

		} elseif ($this->isOverlappedFromRightBy($other)) {
			// This:  □□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□□□□□□□
			// Other: □□□□□□□□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□
			//    $other->from   |   | <- $this-till

			return new static($other->getLeft(), $this->getRight());

		} elseif ($other->isOverlappedFromRightBy($this)) {
			// This:  □□□□□□□□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□□□□
			// Other: □□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□□□□□□□□□□
			//    $this->from -> |   | <- $other-till

			return new static($this->getLeft(), $other->getRight());
		}

		$dummy = $this->left->asOpened();

		return new static($dummy, $dummy);
	}
339645
public function logicalAnd(self $other){
		
		$l = \max(array($this->count(), $other->count()));
		$new = new static();
		
		for($i = 0; $i < $l; ++$i){
			$new[$i] = isset($this[$i], $other[$i])
					? ($this[$i] && $other[$i])
					: false;
		}
		
		return $new;
		
	}
386665
public function overrules(Index $other)
    {
        if ($other->isPrimary()) {
            return false;
        }

        if ($this->isSimpleIndex() && $other->isUnique()) {
            return false;
        }

        return $this->spansColumns($other->getColumns()) && ($this->isPrimary() || $this->isUnique()) && $this->samePartialIndex($other);
    }
1289143
public function overlaps(LatLngBounds $other)
    {
        $southWest = $other->getSouthWest();
        $northEast = $other->getNorthEast();

        $latOverlaps = ($northEast->getLatitude() > $this->southWest->getLatitude())
            && ($southWest->getLatitude() < $this->northEast->getLatitude());

        $lngOverlaps = ($northEast->getLongitude() > $this->southWest->getLongitude())
            && ($southWest->getLongitude() < $northEast->getLongitude());

        return $latOverlaps && $lngOverlaps;
    }
962001
public function contains(Period $interval, Period ...$intervals): bool
    {
        $intervals[] = $interval;
        foreach ($intervals as $period) {
            if (false === $this->indexOf($period)) {
                return false;
            }
        }

        return true;
    }
777276
public function shallowEquals(Atomic $other)
    {
        return strtolower($this->getKey()) === strtolower($other->getKey())
            && !($other instanceof ObjectLike && $this instanceof ObjectLike);
    }
551018
public function equals($other) {
		if ($other instanceof UrlPort) {
			return ($this->isEmpty() && $other->isEmpty()) || ($this->port === $other->port);
		}
		if (is_int($other)) {
			return $this->port === $other;
		}
		if (is_null($other)) {
			return is_null($this->port);
		}
		return false;
	}
365657
public function equals($other) {
		if ($other instanceof UrlQuery) {
			return ($this->isEmpty() && $other->isEmpty()) || ($this->__toString() === $other->__toString() );
		}
		if (is_null($other)) {
			return $this->isEmpty();
		}
		return false;
	}
1080633
public function lt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) < 0);
    }
576868
public function compare(self $other)
    {
        $this->assertSameCurrency($other);

        if ($this->amount < $other->amount) {
            return -1;
        }

        if ($this->amount > $other->amount) {
            return 1;
        }

        return 0;
    }
1166587
public boolean overlaps(Span other) {
      return other != null && this.start() < other.end() && this.end() > other.start();
   }
487725
public function add($interval)
    {
        parent::add($interval);

        if ($interval instanceof DateInterval) {
            if ($interval->invert) { // is negative, then sub
                $this->subMicroseconds($interval->u);
            } else {
                $this->addMicroseconds($interval->u);
            }
        }

        return $this;
    }
466823
public function equals($other)
    {
        $value = $other instanceof Value ? $other->getValue() : $other;

        return $this->getValue() === $value;
    }
826422
public function assert(Interval $first, Interval $second): bool
    {
        return
            $second->getStart()->greaterThanOrEqualTo($first->getStart()) &&
            $second->getEnd()->lessThanOrEqualTo($first->getEnd());
    }
411390
public function gt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) > 0);
    }
867340
@SuppressWarnings("unchecked")
    public T overlap(final T otherInterval) {
        if (otherInterval == null) {
            return null;
        }
        if (otherInterval.isInfinite()) {
            return (T)this;
        }
        if (this.isInfinite()) {
            return otherInterval;
        }
        final Interval thisAsInterval = asInterval();
        final Interval otherAsInterval = otherInterval.asInterval();
        Interval overlap = thisAsInterval.overlap(otherAsInterval);
        if (overlap == null) {
            return null;
        }
        return newInterval(overlap);
    }
400996
public function add(self $other): self
    {
        return self::from($this->value + $other->value);
    }