Variable Manipulation Functions
The following functions operate on PHP variables. There are functions for getting and setting the type of a variable, as well as various ways to encode and decode variables for storage.
- bool define(string var_name, mixed value[, int case_sensitive])
Define a constant value
- int defined(string constant_name)
Test if a constant is defined
- double doubleval(mixed var)
Get the double-precision value of a variable
- string getenv(string varname)
Get the value of an environment variable
- string gettype(mixed var)
Return the type of the variable
- int intval(mixed var [, int base])
Get the integer value of a variable using the optional base for the conversion
- bool is_array(mixed var)
Return
trueif variable is an array- bool is_double(mixed var)
Return
trueif variable is a double- bool is_float(mixed var)
An alias for
is_double- bool is_int(mixed var)
An alias for
is_long- bool is_integer(mixed var)
An alias for
is_long- bool is_long(mixed var)
Return
trueif variable is a long (integer)- bool is_object(mixed var)
Return
trueif variable is an object- string pack(string format, mixed arg1, mixed arg2, ...)
Take one or more arguments and pack them into a binary string according to the format argument
- bool is_real(mixed var)
An alias for
is_double- bool is_string(mixed var)
Return
trueif variable is a string- void putenv(string setting)
Set the value of an environment variable
- string serialize(mixed variable)
Return a string representation of variable (which can later ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access