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[, intcase_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 arraybool is_double(mixed var)Return
trueif variable is a doublebool 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 objectbool is_real(mixed var)An alias for
is_double( )bool is_string(mixed var)Return
trueif variable is a stringstring pack(string format, mixed arg1, mixedarg2, ...)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 stringvoid putenv(string setting)Set the value of an environment variable
string ...
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