Signatur
ceil(int|float $num): float
Beschreibung
Gibt float zurück — auch bei ganzen Zahlen. Für int: (int) ceil($x).
Parameter
| Name | Typ | Default | Beschreibung |
|---|---|---|---|
| $num Pflicht | int|float | — | Zahl. |
Rückgabewert
Typ
float
Beschreibung
Aufgerundeter Wert.
Beispiele
Basis
<?php
echo ceil(4.1); // 5
echo ceil(-4.9); // -4