From 5678ecd93bf69e434e31e4965c6bc9a30d8e7ceb Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Fri, 21 Sep 2001 23:35:51 +0000 Subject: [PATCH] Document floatval as the main function, doubleval as the alias. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57999 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/var.xml | 82 ++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/functions/var.xml b/functions/var.xml index e8a0c70103..df7986e22b 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -1,5 +1,5 @@ - + Variable Functions Variables @@ -7,37 +7,21 @@ doubleval - Get double value of a variable + Alias of floatval Description - - - float doubleval - mixed var - - - - Returns the double (floating point) value of - var. - - Var may be any scalar type. You cannot use - doubleval on arrays or objects. - - -$var = '122.34343The'; -$double_value_of_var = doubleval ($var); -print $double_value_of_var; // prints 122.34343 - - + This function is an alias of floatval. - - See also intval, - strval, settype and - Type - juggling. - + + + This alias is a left-over from a function-renaming. In older versions of + PHP you'll need to use this alias of the floatval + function, because floatval wasn't yet available in + that version. + + @@ -98,6 +82,42 @@ if (!isset($var)) { // evaluates false + + + floatval + Get float value of a variable + + + Description + + + float floatval + mixed var + + + + Returns the float value of var. + + + Var may be any scalar type. You cannot use + floatval on arrays or objects. + + +$var = '122.34343The'; +$float_value_of_var = floatval ($var); +print $float_value_of_var; // prints 122.34343 + + + + + See also intval, + strval, settype and + Type + juggling. + + + + gettype @@ -304,7 +324,7 @@ echo get_resource_type($doc->doc)."\n"; - See also doubleval, + See also floatval, strval, settype and Type juggling. @@ -1008,7 +1028,9 @@ if (!odbc_execute ($stmt, &$sqldata)) { "boolean" "integer" - "double" + "double" (this is for historical reasons only, + "double" will be returned when the type is + float. "string" "array" "object" @@ -1061,7 +1083,7 @@ settype($bar, "string"); // $bar is now "1" (string) strval on arrays or objects. - See also doubleval, + See also floatval, intval, settype and Type juggling.