src/eMacros/Runtime/Comparison/ComparisonPredicate.php
public function execute(array $operands) {
		if (empty($operands))
			throw new \BadFunctionCallException(sprintf("%s: No objects to compare.", get_class($this)));
		if (!isset($operands[1]))
			throw new \BadFunctionCallException(sprintf("%s: Cannot compare single object.", get_class($this)));
		$fst = array_shift($operands);
		$or = $this->logicalOr;
		
		foreach ($operands as $val) {
			if ($or xor !$this->compare($fst, $val)) return $or;
			$fst = $val;
		}
		
		return !$or;
	}
public function execute(array $operands) {
		if (empty($operands))
			throw new \BadFunctionCallException(sprintf("%s: No objects to compare.", get_class($this)));
		if (!isset($operands[1]))
			throw new \BadFunctionCallException(sprintf("%s: Cannot compare single object.", get_class($this)));
		$fst = array_shift($operands);
		$or = $this->logicalOr;
		
		foreach ($operands as $val) {
			if ($or xor !$this->compare($fst, $val)) return $or;
			$fst = $val;
		}
		
		return !$or;
	}
public function execute ( array $ operands ) { if ( empty ( $ operands ) ) throw new \ BadFunctionCallException ( sprintf ( "%s: No objects to compare." , get_class ( $ this ) ) ) ; if ( ! isset ( $ operands [ 1 ] ) ) throw new \ BadFunctionCallException ( sprintf ( "%s: Cannot compare single object." , get_class ( $ this ) ) ) ; $ fst = array_shift ( $ operands ) ; $ or = $ this -> logicalOr ; foreach ( $ operands as $ val ) { if ( $ or xor ! $ this -> compare ( $ fst , $ val ) ) return $ or ; $ fst = $ val ; } return ! $ or ; }
Compares various operands
Usage: (== 1 2) (>= 4 3) (=== "1" 1)
Returns: boolean
(non-PHPdoc)
@see \eMacros\Runtime\GenericFunction::execute()
Compares various operands Usage : ( == 1 2 ) ( > = 4 3 ) ( === 1 1 ) Returns : boolean ( non - PHPdoc )