You are here: Home // Variable Functions

var_dump

(PHP3 >= 3.0.5, PHP4 ) var_dump – Dumps information about a variable Description void var_dump (mixed expression) This function returns structured information about an expression that includes its type and value. Arrays are explored recursively with values indented to show structure. Compare var_dump() to print_r(). <pre> <?php $a = array (1, 2,

unset

(unknown) unset – Unset a given variable Description int unset (mixed var) unset() destroys the specified variable and returns true. Example 1. Unset() example unset ($foo); unset ($bar['quux']);

strval

(PHP3 , PHP4 ) strval – Get string value of a variable Description string strval (mixed var) Returns the string value of var. var may be any scalar type. You cannot use strval() on arrays or objects.

settype

(PHP3 , PHP4 ) settype – Set the type of a variable Description int settype (string var, string type) Set the type of variable var to type. Possibles values of type are: “integer” “double” “string” “array” “object” Returns true if successful; otherwise returns false.

isset

(unknown) isset – Determine whether a variable is set Description int isset (mixed var) Returns true if var exists; 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

is_string

(PHP3 , PHP4 ) is_string – Finds whether a variable is a string Description int is_string (mixed var) Returns true if var is a string, false otherwise.

is_resource

(PHP4 >= 4.0b4) is_resource –  Finds whether a variable is a resource Description int is_resource (mixed var) is_resource() returns true if the variable given by the var parameter is a resource, otherwise it returns false. Resources are things like file or database result handles that are allocated and freed by internal PHP functions and that may

is_real

(PHP3 , PHP4 ) is_real – Finds whether a variable is a real Description int is_real (mixed var) This function is an alias for is_double().

is_object

(PHP3 , PHP4 ) is_object – Finds whether a variable is an object Description int is_object (mixed var) Returns true if var is an object, false otherwise.

is_numeric

(PHP4 >= 4.0RC1) is_numeric –  Finds whether a variable is a number or a numeric string Description int is_numeric (mixed var) Returns true if var is a number or a numeric string, false otherwise.
Copyright © 2010 PHP Manual. SiteMap.
Designed by Web Design SiteConstruct. Powered by WordPress.