Variable functionsVariablesdoublevalGet double value of a variable.Descriptiondouble doublevalmixed var
Returns the double (floating point) value of var.var may be any scalar type. You cannot use
doubleval on arrays or objects.
See also intval,
strval,
settype and Type juggling.emptydetermine whether a variable is setDescriptionint emptymixed var
Returns false if var is set and has a
non-empty or non-zero value; true otherwise.
See also isset and unset.gettypeGet the type of a variable.Descriptionstring gettypemixed var
Returns the type of the PHP variable var.
Possibles values for the returned string are:
"integer""double""string""array""object""unknown type"
See also settype.intvalGet integer value of a variable.Descriptionint intvalmixed varint base
Returns the integer value of var,
using the specified base for the conversion (the default is
base 10).var may be any scalar type. You cannot use
intval on arrays or objects.
See also doubleval,
strval,
settype and Type juggling.is_arrayFinds whether a variable is an array.Descriptionint is_arraymixed var
Returns true if var is an array, false
otherwise.
See also is_double,
is_float,
is_int,
is_integer,
is_real,
is_string,
is_long, and
is_object.is_doubleFinds whether a variable is a double.Descriptionint is_doublemixed var
Returns true if var is a double,
false otherwise.
See also is_array,
is_float,
is_int,
is_integer,
is_real,
is_string,
is_long, and
is_object.is_floatFinds whether a variable is a float.Descriptionint is_floatmixed var
This function is an alias for is_double.
See also is_double,
is_real,
is_int,
is_integer,
is_string,
is_object,
is_array, and
is_long.is_intFind whether a variable is an integer.Descriptionint is_intmixed var
This function is an alias for is_long.
See also is_double,
is_float,
is_integer,
is_string,
is_real,
is_object,
is_array, and
is_long.is_integerFind whether a variable is an integer.Descriptionint is_integermixed var
This function is an alias for is_long.
See also is_double,
is_float,
is_int,
is_string,
is_real,
is_object,
is_array, and
is_long.is_longFinds whether a variable is an integer.Descriptionint is_longmixed var
Returns true if var is an integer (long),
false otherwise.
See also is_double,
is_float,
is_int,
is_real,
is_string,
is_object,
is_array, and
is_integer.is_objectFinds whether a variable is an object.Descriptionint is_objectmixed var
Returns true if var is an object, false
otherwise.
See also is_long,
is_int,
is_integer,
is_float,
is_double,
is_real,
is_string, and
is_array.is_realFinds whether a variable is a real.Descriptionint is_realmixed var
This function is an alias for is_double.
See also is_long,
is_int,
is_integer,
is_float,
is_double,
is_object,
is_string, and
is_array.is_stringFinds whether a variable is a string.Descriptionint is_stringmixed var
Returns true if var is a string,
false otherwise.
See also is_long,
is_int,
is_integer,
is_float,
is_double,
is_real,
is_object, and
is_array.issetdetermine whether a variable is setDescriptionint issetmixed 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
See also empty and unset.settypeSet the type of a variable.Descriptionint settypestring varstring 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.
See also gettype.strvalGet string value of a variable.Descriptionstring strvalmixed var
Returns the string value of var.var may be any scalar type. You cannot use
strval on arrays or objects.
See also doubleval,
intval,
settype and Type juggling.unsetUnset a given variableDescriptionint unsetmixed varunset destroys the specified variable and
returns true.unset example
unset( $foo );
unset( $bar['quux'] );
See also isset and empty.