isOneOf() public static method

Returns true if value is one of $allowed, false otherwise.
public static isOneOf ( mixed $value, array | string $allowed ) : boolean
$value mixed
$allowed array | string
return boolean
Beispiel #1
0
 /**
  *
  */
 public function testIsOneOf()
 {
     $oneof = '<>\'"&';
     $input = '&';
     $this->assertTrue(Inspekt::isOneOf($input, $oneof));
 }