The every() method tests whether all elements in the array pass the test implemented by the provided function.

@param callable $callback
@return bool
13394
public function every(callable $callback)
    {
        $array = $this->getArrayCopy();
        foreach ($array as $key => $value) {
            if ($callback($value, $key, $array) === false) {
                return false;
            }
        }

        return true;
    }
514679
public function each($callback)
    {
        foreach ($this->_data as $key => $val) {
            $this->_data[$key] = $callback($val, $key, $this);
        }
        return $this;
    }
1313517
public static function array_all( array $result, callable $callable ) {
    foreach ( $result as $value ) {
      $check = $callable($value);
      if (!$check) {
        return $check;
      }
    }
    return true;
  }
418397
public function all($path, $callback)
    {
        Argument::i()
            //argument 1 should be a string
            ->test(1, 'string')
            //argument 2 should be callable
            ->test(2, 'callable');
        
        return $this->route('all', $path, $callback);
    }
89215
public function last(callable $callback = null, $default = null)
    {
        $collection = $callback ? $this->filter($callback) : $this;

        foreach ($collection->all() as $key => $value) {
            // Nothing needed here
        }

        return isset($value) ? $value : $default;
    }
25029
public function withBulkProcessing(callable $callback)
    {
        $bulkProcessing = $this->bulkProcessing;
        $this->bulkProcessing = true;
        try {
            /** @noinspection PhpUndefinedMethodInspection */
            $callback->__invoke();
        } catch (\Exception $exception) {
            $this->bulkProcessing = $bulkProcessing;
            throw $exception;
        }
        $this->bulkProcessing = $bulkProcessing;
    }
712786
public function each($callback)
    {
        Argument::i()->test(1, 'callable');

        foreach ($this->list as $key => $value) {
            call_user_func($callback, $key, $value);
        }

        return $this;
    }
1289150
public function recursiveIterateElements(\Closure $callback)
    {
        // If Callback function returns TRUE then recurse iterator should stop.
        $result = null;

        foreach ($this->getElements() as $element) {
            if ($element instanceof ElementsInterface) {
                $result = $element->recursiveIterateElements($callback);
            } else {
                $result = $callback($element);
            }

            if ($result === true) {
                break;
            }
        }

        return $result;
    }
442874
private static function _checkCallback($cls, $callback, $context)
    {
        self::_initiateCallbacks($cls);
        foreach (self::$_callbacks[$cls][$callback] as $func) {
            if (!call_user_func(array($context, $func))) {
                return false;
            }
        }
        return true;
    }
256812
public static function listen($event, $callback)
	{
		if (!isset(self::$events[$event])) {
			self::$events[$event] = array();
		}
		
		self::$events[$event][] = $callback;
		return true;
	}
74488
public static function some(array $set, Closure $callback) {
        foreach ($set as $value) {
            if ($callback($value, $value)) {
                return true;
            }
        }

        return false;
    }
483760
public static function only(array $arr, callable $callback): bool
    {
        $arrLength = 0;

        foreach ($arr as $index => $value) {
            if ($callback($value, $index) === true) {
                $arrLength++;
            }
        }

        return $arrLength === 1;
    }
807368
function each(object, callback) {
		if (!object) { return true; }
		if (object.forEach) { return object.forEach(callback); }
		if (object instanceof Array) {
			var	length	= array ? array.length : 0;
			for(var index = 0; index < length; index++) {
				callback(array[index], index);
			}
		}else{
			for(var key in object) {
				if (!object.hasOwnProperty(key)) { continue; }
				callback(object[key], key);
			}
		}
		return false;
	}
751931
public function each(callable $callback)
    {
        foreach ($this->items as $key => $item) {
            $result = $callback($item, $key);

            if (false === $result) {
                break;
            }

            if (!is_object($item)) {
                $this->items[$key] = $result;
            }
        }

        return $this;
    }
930615
public function each( $callback ) {

			if ( is_callable( $callback ) ) {

				for ( $i=0; $i < $this->len; $i++ ) {

					if ( call_user_func( $callback, $this->items[$i], $i, $this ) === false ) {
						break;
					}

				}

			}

			return $this;

		}
1036459
public function each(callable $callback)
    {
        foreach ($this->all() as $key => $value) {
            $callback($key, $value);
        }

        return $this;
    }
328468
public function each(callable $callback)
	{
		foreach ($this->members as $key => $member)
		{
			if ($callback($key, $member) === false) {
				break;
			}
		}
		return $this;
	}