class EvalMath (View source)

Class EvalMath

Properties

bool $suppress_errors
?string $last_error
?array{0: int, 1: null|string|array{0: ?mixed, 1: int}} $last_error_code
array<string, float|string> $v
array<string, array{args: string[], func: array<string|float>}> $f
string[] $vb
string[] $fb

Methods

__construct()

Constructor

bool|int|float|null|mixed
e(string $expr)

Evaluate

bool|int|float|null|mixed
evaluate(string $expr)

Evaluate

array<string, float>
vars()

Function vars

false
trigger(int $code, string $msg, null|string|array{0: ?mixed, 1: int} $info = null)

trigger an error, but nicely, if need be

Details

__construct()

Constructor

bool|int|float|null|mixed e(string $expr)

Evaluate

Parameters

string $expr String

Return Value

bool|int|float|null|mixed Result

bool|int|float|null|mixed evaluate(string $expr)

Evaluate

Parameters

string $expr String

Return Value

bool|int|float|null|mixed Result

array<string, float> vars()

Function vars

Return Value

array<string, float> Output

false trigger(int $code, string $msg, null|string|array{0: ?mixed, 1: int} $info = null)

trigger an error, but nicely, if need be

Parameters

int $code Code
string $msg Msg
null|string|array{0: ?mixed, 1: int} $info String

Return Value

false