Returns the haystack option
| Return type: | mixed |
|---|---|
| Throws : | ExceptionRuntimeException if haystack option is not set |
Sets the haystack option
| Parameters: | mixed – |
|---|---|
| Return type: | InArray Provides a fluent interface |
Sets the strict option mode InArray::CHECK_STRICT | InArray::CHECK_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY | InArray::CHECK_NOT_STRICT
| Parameters: | int – |
|---|---|
| Return type: | InArray Provides a fluent interface |
| Throws : | ExceptionInvalidArgumentException |
Sets the recursive option
| Parameters: | bool – |
|---|---|
| Return type: | InArray Provides a fluent interface |
Returns true if and only if $value is contained in the haystack option. If the strict option is true, then the type of $value is also checked.
| Parameters: | mixed – See {@link http://php.net/manual/function.in-array.php#104501} |
|---|---|
| Return type: | bool |
standard in_array strict checking value and type
Non strict check but prevents “asdf” == 0 returning TRUE causing false/positive. This is the most secure option for non-strict checks and replaces strict = false This will only be effective when the input is a string
Standard non-strict check where “asdf” == 0 returns TRUE This will be wanted when comparing “0” against int 0