Documentation

Operations
in package
Uses ArrayEnabled

Table of Contents

Properties

$arrayArgumentHelper  : ArrayArgumentHelper|null

Methods

logicalAnd()  : bool|string
LOGICAL_AND.
logicalOr()  : bool|string
LOGICAL_OR.
logicalXor()  : bool|string
LOGICAL_XOR.
NOT()  : array<string|int, mixed>|bool|string
NOT.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.
countTrueValues()  : bool|string
initialiseHelper()  : void
testFalse()  : bool

Properties

Methods

logicalAnd()

LOGICAL_AND.

public static logicalAnd(mixed ...$args) : bool|string

Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.

Excel Function: =AND(logical1[,logical2[, ...]])

   The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
       or references that contain logical values.

   Boolean arguments are treated as True or False as appropriate
   Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
   If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string
       holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
Parameters
$args : mixed

Data values

Return values
bool|string

the logical AND of the arguments

logicalOr()

LOGICAL_OR.

public static logicalOr(mixed ...$args) : bool|string

Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

Excel Function: =OR(logical1[,logical2[, ...]])

   The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
       or references that contain logical values.

   Boolean arguments are treated as True or False as appropriate
   Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
   If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string
       holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
Parameters
$args : mixed

Data values

Return values
bool|string

the logical OR of the arguments

logicalXor()

LOGICAL_XOR.

public static logicalXor(mixed ...$args) : bool|string

Returns the Exclusive Or logical operation for one or more supplied conditions. i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE, and FALSE otherwise.

Excel Function: =XOR(logical1[,logical2[, ...]])

   The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
       or references that contain logical values.

   Boolean arguments are treated as True or False as appropriate
   Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
   If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string
       holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
Parameters
$args : mixed

Data values

Return values
bool|string

the logical XOR of the arguments

NOT()

NOT.

public static NOT([mixed $logical = false ]) : array<string|int, mixed>|bool|string

Returns the boolean inverse of the argument.

Excel Function: =NOT(logical)

   The argument must evaluate to a logical value such as TRUE or FALSE

   Boolean arguments are treated as True or False as appropriate
   Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
   If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string
       holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
Parameters
$logical : mixed = false

A value or expression that can be evaluated to TRUE or FALSE Or can be an array of values

Return values
array<string|int, mixed>|bool|string

the boolean inverse of the argument If an array of values is passed as an argument, then the returned result will also be an array with the same dimensions

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

countTrueValues()

private static countTrueValues(array<string|int, mixed> $args, callable $func) : bool|string
Parameters
$args : array<string|int, mixed>
$func : callable
Return values
bool|string

initialiseHelper()

private static initialiseHelper(array<string|int, mixed>|false $arguments) : void
Parameters
$arguments : array<string|int, mixed>|false

Can be changed to array for Php8.1+

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results