Documentation

Dollar
in package
Uses ArrayEnabled

Table of Contents

Properties

$arrayArgumentHelper  : ArrayArgumentHelper|null

Methods

decimal()  : array<string|int, mixed>|string|float
DOLLARDE.
format()  : array<string|int, mixed>|string
DOLLAR.
fractional()  : array<string|int, mixed>|string|float
DOLLARFR.
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.
initialiseHelper()  : void
testFalse()  : bool

Properties

Methods

decimal()

DOLLARDE.

public static decimal([mixed $fractionalDollar = null ][, mixed $fraction = 0 ]) : array<string|int, mixed>|string|float

Converts a dollar price expressed as an integer part and a fraction part into a dollar price expressed as a decimal number. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARDE(fractional_dollar,fraction)

Parameters
$fractionalDollar : mixed = null

Fractional Dollar Or can be an array of values

$fraction : mixed = 0

Fraction Or can be an array of values

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

format()

DOLLAR.

public static format(mixed $number[, mixed $precision = 2 ]) : array<string|int, mixed>|string

This function converts a number to text using currency format, with the decimals rounded to the specified place. The format used is $#,##0.00_);($#,##0.00)..

Parameters
$number : mixed

The value to format, or can be an array of numbers Or can be an array of values

$precision : mixed = 2

The number of digits to display to the right of the decimal point (as an integer). If precision is negative, number is rounded to the left of the decimal point. If you omit precision, it is assumed to be 2 Or can be an array of precision values

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

If an array of values is passed for either of the arguments, then the returned result will also be an array with matching dimensions

fractional()

DOLLARFR.

public static fractional([mixed $decimalDollar = null ][, mixed $fraction = 0 ]) : array<string|int, mixed>|string|float

Converts a dollar price expressed as a decimal number into a dollar price expressed as a fraction. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARFR(decimal_dollar,fraction)

Parameters
$decimalDollar : mixed = null

Decimal Dollar Or can be an array of values

$fraction : mixed = 0

Fraction Or can be an array of values

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

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>

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