Oihana PHP Arango

anyIn.php

Table of Contents

Functions

anyIn()  : string
Returns an AQL expression that checks if **any elements** of an array are contained in another array.

Functions

anyIn()

Returns an AQL expression that checks if **any elements** of an array are contained in another array.

anyIn(mixed $leftOperand, mixed $rightOperand) : string

Equivalent to the ArangoDB ANY IN array comparison operator.

Example:

  • [1, 2, 3] ANY IN [1, 2, 3] returns true
  • [1, 2, 4] ANY IN [1, 2, 3] returns true (because 1 or 2 are in the second array)
Parameters
$leftOperand : mixed

The array or expression to evaluate.

$rightOperand : mixed

The array or expression to check membership against.

Tags
example
echo anyIn('[1, 2, 3]', '[1, 2, 3]');
// [1, 2, 3] ANY IN [1, 2, 3]

echo anyIn('scores', '[10, 20, 30]');
// scores ANY IN [10, 20, 30]
see
https://docs.arangodb.com/stable/aql/operators/#array-comparison-operators
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL predicate string.

On this page

Search results