logicalOr() public static method

Returns true if at least one value is true.
public static logicalOr ( array $array ) : boolean
$array array
return boolean Result
Beispiel #1
0
 /**
  * UtilityTest::testLogicalOr()
  *
  * @covers ::logicalOr
  * @return void
  */
 public function testLogicalOr()
 {
     $array = ['a' => 0, 'b' => 1, 'c' => 0, 'd' => 1];
     $is = Utility::logicalOr($array);
     $this->assertTrue($is);
     $array = ['a' => 1, 'b' => 1, 'c' => 1, 'd' => 1];
     $is = Utility::logicalOr($array);
     $this->assertTrue($is);
     $array = ['a' => 0, 'b' => 0, 'c' => 0, 'd' => 0];
     $is = Utility::logicalOr($array);
     $this->assertFalse($is);
 }