Variables & Constants
9 entries
constant
Returns the value of a constant given its name (a runtime reflection lookup for constants).
define
Defines a named constant at runtime (complementing the const keyword).
empty
Checks whether a variable is empty (a language construct: "", 0, "0", null, false, [] and undefined all count as empty).
get_defined_vars
Returns every defined variable in the current scope (in a function: parameters plus in-body variables; globally, superglobals too) - a dynamic-language introspection feature.
getenv
Reads process environment variables: by name (false when absent; omit the name for the whole environment array); values written by putenv are immediately visible to later reads in the same process.
gettype
Returns the variable's type name string (historical names: float as double, int as integer); prefer get_debug_type for debugging.
isset
Determines whether a variable is declared and is not null (a language construct that accepts multiple variables).
putenv
Mutates this process's environment block with "NAME=value" syntax (add or overwrite); a bare "NAME" without "=" deletes. The change affects only this process and children spawned afterwards, and is restored at the end of the request (web context).
unset
Destroys the given variable or array key (a language construct that accepts multiple targets).