empty
<<<
floatval get_defined_vars
>>>

7.105 Variables
7 Index des fonctions
 Manuel PHP

. Introduction
. Pré-requis
. Installation
. Configuration à l'exécution
. Types de ressources
. Constantes prédefinies
. doubleval
. empty
->floatval
. get_defined_vars
. get_resource_type
. gettype
. import_request_variables
. intval
. is_array
. is_bool
. is_callable
. is_double
. is_float
. is_int
. is_integer
. is_long
. is_null
. is_numeric
. is_object
. is_real
. is_resource
. is_scalar
. is_string
. isset
. print_r
. serialize
. settype
. strval
. unserialize
. unset
. var_dump
. var_export

7.105.9 floatval()Convertit une chaîne en nombre à virgule flottante

[ Exemples avec floatval ]   PHP 4 >= 4.2.0

float  floatval ( mixed   var )

floatval retourne la valeur de type float (nombre à virgule flottante), extraite à partir du paramètre var .

var peut être n'importe quel type scalaire. Vous ne pouvez pas utiliser floatval sur un tableau ou un objet.
Exemple avec floatval

<?php
  $var
= '122.34343Le';
  
$float_value_of_var = floatval ($var);
  print
$float_value_of_var; // Affiche 122.34343
?>

Voir aussi intval , strval , settype et Transtypage .

<< floatval >>
empty Variables get_defined_vars