var_export gets structured information about the given variable. It is similar to var_dump with one exception: the returned representation is valid PHP code.
The variable you want to export.
If used and set to true, var_export will return the variable representation instead of outputting it.
Returns the variable representation when the return parameter is used and evaluates to true. Otherwise, this function will return null.
Variables of type resource couldn't be exported by this function.
var_export does not handle circular references as it would be close to impossible to generate parsable PHP code for that. If you want to do something with the full representation of an array or object, use serialize.
When var_export exports objects, the leading backslash is not included in the class name of namespaced classes for maximum compatibility.
To be able to evaluate the PHP generated by var_export, all processed objects must implement the magic __set_state method. The only exception is stdClass, which is exported using an array cast to an object.
Now exports stdClass objects as an array cast to
an object (