public function executeAll(...$args)
    {
        if ($this->isEmpty()) {
            return 0;
        }

        $n = 0;
        do {
            if ($cb = $this->shift()) {
                $cb(...$args);
                ++$n;
                if ($cb instanceof CallbackWrapper) {
                    $cb->cancel();
                }
            }
        } while (!$this->isEmpty());
        return $n;
    }
public function executeAll(...$args)
    {
        if ($this->isEmpty()) {
            return 0;
        }

        $n = 0;
        do {
            if ($cb = $this->shift()) {
                $cb(...$args);
                ++$n;
                if ($cb instanceof CallbackWrapper) {
                    $cb->cancel();
                }
            }
        } while (!$this->isEmpty());
        return $n;
    }
public function executeAll ( ... $ args ) { if ( $ this -> isEmpty ( ) ) { return 0 ; } $ n = 0 ; do { if ( $ cb = $ this -> shift ( ) ) { $ cb ( ... $ args ) ; ++ $ n ; if ( $ cb instanceof CallbackWrapper ) { $ cb -> cancel ( ) ; } } } while ( ! $ this -> isEmpty ( ) ) ; return $ n ; }
Executes all callbacks with given arguments
@param array $args
@return int
Executes all callbacks with given arguments