src/Observable.php
public function partition(callable $predicate): array
    {
        return [
            $this->filter($predicate),
            $this->filter(function () use ($predicate) {
                return !call_user_func_array($predicate, func_get_args());
            })
        ];
    }
public function partition(callable $predicate): array
    {
        return [
            $this->filter($predicate),
            $this->filter(function () use ($predicate) {
                return !call_user_func_array($predicate, func_get_args());
            })
        ];
    }
public function partition ( callable $ predicate ) : array { return [ $ this -> filter ( $ predicate ) , $ this -> filter ( function ( ) use ( $ predicate ) { return ! call_user_func_array ( $ predicate , func_get_args ( ) ) ; } ) ] ; }
Returns two observables which partition the observations of the source by the given function.
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.

@param callable $predicate
@return Observable[]

@demo partition/partition.php
@operator
@reactivex groupBy
Returns two observables which partition the observations of the source by the given function . 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 .