Services webmasters
Partenaires
Jeux concours gratuits
 
bindec
<<<
ceil cos
>>>

7.50 Mathématiques
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes prédefinies
abs
acos
acosh
asin
asinh
atan
atan2
atanh
base_convert
bindec
->ceil
cos
cosh
decbin
dechex
decoct
deg2rad
exp
expm1
floor
fmod
getrandmax
hexdec
hypot
is_finite
is_infinite
is_nan
lcg_value
log
log10
log1p
max
min
mt_getrandmax
mt_rand
mt_srand
octdec
pi
pow
rad2deg
rand
round
sin
sinh
sqrt
srand
tan
tanh

7.50.17 ceil()Arrondit au nombre supérieur

[ Exemples avec ceil ]   PHP 3, PHP 4

float  ceil ( float   value )

ceil retourne l'entier supérieur du nombre value . Utiliser ceil sur un entier ne sert à rien. La valeur retournée est un nombre à virgule flottante ( float ), car ces nombres peuvent être plus grands que les entiers.
Exemple avec ceil

<?php
  
echo ceil(4.3);    // 5
  
echo ceil(9.999);  // 10
?>

Voir aussi floor et round .

<< ceil >>
bindec Mathématiques cos
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -