From 51ff04df1bc520cad7fd36cdc254325ef0ecd6e5 Mon Sep 17 00:00:00 2001 From: Egon Schmid Date: Thu, 17 Feb 2000 16:16:18 +0000 Subject: [PATCH] A nicer version. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@19844 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/var.xml | 240 +++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 130 deletions(-) diff --git a/functions/var.xml b/functions/var.xml index 012918cc22..1becb5b1eb 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -1,4 +1,4 @@ - + Variable functions Variables @@ -13,23 +13,23 @@ double doubleval mixed var - - Returns the double (floating point) value of var. - + Returns the double (floating point) value of + var. + var may be any scalar type. You cannot use - doubleval on arrays or objects. - + doubleval on arrays or objects. + See also intval, - strval, - settype and Type juggling. - + strval, settype and + Type + juggling. + - empty @@ -41,27 +41,23 @@ int empty mixed var - Returns false if var is set and has a non-empty or non-zero value; true otherwise. - Note that this is meaningless when used on anything which isn't a - variable; i.e. empty( addslashes( $name ) ) - has no meaning since it would be checking whether something which + variable; i.e. empty (addslashes ($name)) has + no meaning since it would be checking whether something which isn't a variable is a variable with a false value. - - See also isset and unset. + See also isset and + unset. - - gettype @@ -73,10 +69,10 @@ string gettype mixed var - - Returns the type of the PHP variable var. - + Returns the type of the PHP variable + var. + Possibles values for the returned string are: @@ -86,15 +82,14 @@ "array" "object" "unknown type" - - + + - See also settype. - + See also settype. + - intval @@ -105,23 +100,25 @@ int intval mixed var - int base + int + base + - Returns the integer value of var, using the specified base for the conversion (the default is - base 10). - + base 10). + var may be any scalar type. You cannot use - intval on arrays or objects. - + intval on arrays or objects. + See also doubleval, - strval, - settype and Type juggling. - + strval, settype and + Type + juggling. + @@ -136,11 +133,10 @@ int is_array mixed var - Returns true if var is an array, false - otherwise. - + otherwise. + See also is_double, is_float, @@ -149,12 +145,11 @@ is_real, is_string, is_long, and - is_object. - + is_object. + - is_double @@ -166,11 +161,10 @@ int is_double mixed var - Returns true if var is a double, - false otherwise. - + false otherwise. + See also is_array, is_float, @@ -179,12 +173,11 @@ is_real, is_string, is_long, and - is_object. - + is_object. + - is_float @@ -196,10 +189,9 @@ int is_float mixed var - - This function is an alias for is_double. - + This function is an alias for is_double. + See also is_double, is_real, @@ -208,12 +200,11 @@ is_string, is_object, is_array, and - is_long. - + is_long. + - is_int @@ -225,10 +216,9 @@ int is_int mixed var - - This function is an alias for is_long. - + This function is an alias for is_long. + See also is_double, is_float, @@ -237,12 +227,11 @@ is_real, is_object, is_array, and - is_long. - + is_long. + - is_integer @@ -254,10 +243,10 @@ int is_integer mixed var - - This function is an alias for is_long. - + This function is an alias for + is_long. + See also is_double, is_float, @@ -266,12 +255,11 @@ is_real, is_object, is_array, and - is_long. - + is_long. + - is_long @@ -283,11 +271,10 @@ int is_long mixed var - Returns true if var is an integer (long), - false otherwise. - + false otherwise. + See also is_double, is_float, @@ -296,12 +283,11 @@ is_string, is_object, is_array, and - is_integer. - + is_integer. + - is_object @@ -313,11 +299,10 @@ int is_object mixed var - Returns true if var is an object, false - otherwise. - + otherwise. + See also is_long, is_int, @@ -326,12 +311,11 @@ is_double, is_real, is_string, and - is_array. - + is_array. + - is_real @@ -343,10 +327,10 @@ int is_real mixed var - - This function is an alias for is_double. - + This function is an alias for + is_double. + See also is_long, is_int, @@ -355,12 +339,11 @@ is_double, is_object, is_string, and - is_array. - + is_array. + - is_string @@ -372,11 +355,10 @@ int is_string mixed var - Returns true if var is a string, - false otherwise. - + false otherwise. + See also is_long, is_int, @@ -385,12 +367,11 @@ is_double, is_real, is_object, and - is_array. - + is_array. + - isset @@ -402,24 +383,26 @@ int isset mixed var - Returns true if var exists; - false otherwise. - + false otherwise. + If a variable has been unset with unset, it will no longer be isset. - + + $a = "test"; -echo isset($a); // true -unset($a); -echo isset($a); // false - - +echo isset ($a); // true +unset ($a); +echo isset ($a); // false + + + - See also empty and unset. - + See also empty and + unset. + @@ -472,11 +455,10 @@ print_r ($a); string var string type - Set the type of variable var to - type. - + type. + Possibles values of type are: @@ -485,18 +467,17 @@ print_r ($a); "string" "array" "object" - - + + - Returns true if successful; otherwise returns false. - + Returns true if successful; otherwise returns false. + - See also gettype. - + See also gettype. + - strval @@ -508,23 +489,22 @@ print_r ($a); string strval mixed var - - Returns the string value of var. - + Returns the string value of var. + var may be any scalar type. You cannot use - strval on arrays or objects. - + strval on arrays or objects. + See also doubleval, - intval, - settype and Type juggling. - + intval, settype and + Type + juggling. + - unset @@ -536,26 +516,26 @@ print_r ($a); int unset mixed var - unset destroys the specified variable and - returns true. - + returns true. + <function>unset</function> example - -unset( $foo ); -unset( $bar['quux'] ); + +unset ($foo); +unset ($bar['quux']); - - + + - See also isset and empty. - + See also isset and + empty. + - + var_dump