VAR_EXPORT
Outputs or returns a parsable string representation of a variable
SYNTAX
var_export ( mixed $expression [, bool $return = FALSE ] ) : mixed
PARAMETERS
expression
The variable you want to export.
return
If used and set to TRUE, var_export() will return the variable representation instead of outputting it.
RETURN
Returns the variable representation when the return parameter is used and evaluates to TRUE. Otherwise, this function will return NULL.
EXAMPLES
EXPRESSION | BOOL
false
EXPRESSION | INT
0
EXPRESSION | FLOAT
0.0
EXPRESSION | STRING
'0'
EXPRESSION | ARRAY
array (
0 => 0,
1 => 1,
2 =>
array (
0 => 0,
1 => 1,
),
)
EXPRESSION | OBJECT | STANDARD CLASS
(object) array(
'var' => 0,
)
EXPRESSION | OBJECT | CUSTOM CLASS
myclass::__set_state(array(
'var' => 0,
))
RETURN | TRUE
myclass::__set_state(array(
'var' => 0,
))
RETURN | FALSE
myclass::__set_state(array(
'var' => 0,
))NULL