Rx\Observable::partition PHP Method

partition() public method

The first will trigger observations for those values for which the predicate returns true. The second will trigger observations for those values where the predicate returns false. The predicate is executed once for each subscribed observer. Both also propagate all error observations arising from the source and each completes when the source completes.
public partition ( callable $predicate ) : Rx\Observable\AnonymousObservable[]
$predicate callable
return Rx\Observable\AnonymousObservable[]
    public function partition(callable $predicate)
    {
        return [$this->filter($predicate), $this->filter(function () use($predicate) {
            return !call_user_func_array($predicate, func_get_args());
        })];
    }