public static function every($list, callable $iterator = null, $context = null)
    {
        static::associate($iterator, $context);

        !$iterator && $iterator = function ($item) {
            return static::identity($item);
        };

        $result = true;
        static::each($list, function ($item, $index) use ($iterator, & $result) {
            if (!$iterator($item)) {
                $result = false;
                return static::BREAKER;
            }
        });

        return $result;
    }
public static function every($list, callable $iterator = null, $context = null)
    {
        static::associate($iterator, $context);

        !$iterator && $iterator = function ($item) {
            return static::identity($item);
        };

        $result = true;
        static::each($list, function ($item, $index) use ($iterator, & $result) {
            if (!$iterator($item)) {
                $result = false;
                return static::BREAKER;
            }
        });

        return $result;
    }
public static function every ( $ list , callable $ iterator = null , $ context = null ) { static :: associate ( $ iterator , $ context ) ; ! $ iterator && $ iterator = function ( $ item ) { return static :: identity ( $ item ) ; } ; $ result = true ; static :: each ( $ list , function ( $ item , $ index ) use ( $ iterator , & $ result ) { if ( ! $ iterator ( $ item ) ) { $ result = false ; return static :: BREAKER ; } } ) ; return $ result ; }
Returns true if all of the values in the list pass the iterator truth test. Short-circuits and stops traversing
the list if a false element is found.

@category Collection Functions

@param traversable $list the list of items to filter
@param callable $iterator the truth-test function
@param object $context optional, if provided will become the context of $iterator

@return bool
Returns true if all of the values in the list pass the iterator truth test . Short - circuits and stops traversing the list if a false element is found .