Oihana PHP Arango

ceil.php

Table of Contents

Functions

ceil()  : string
Return the integer closest but not less than the given value.

Functions

ceil()

Return the integer closest but not less than the given value.

ceil(string|int|float $value) : string

This helper wraps the ArangoDB AQL function CEIL(value) which rounds up a number to the nearest integer that is greater than or equal to the value.

Example AQL usage:

CEIL(4.1)       // returns 5
CEIL(4.9)       // returns 5
CEIL(-4.1)      // returns -4
CEIL(doc.price) // rounds up the price
Parameters
$value : string|int|float

Any number to round up.

Tags
example
use function oihana\arango\db\functions\numerics\ceil;

$expr = ceil(4.1);
// Produces: 'CEIL(4.1)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#ceil
floor()

For rounding down.

round()

For rounding to nearest.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results