Using `var_export(...)` for an object when it is encountered produces the same result as the existing implementation of the `PhpArray` writer (which just calls `var_export(...)` on the whole thing).

It uses the magic `__set_state(...)` static method which is described [here](http://www.php.net/manual/en/language.oop5.magic.php#object.set-state). While using `serialize` is probably safer, changing to use it instead of `var_export` would break BC, as anybody presently using this config writer would not be expecting a serialized object.

That said, this is really a "bad practices edge case" IMO. Configuration files should contain configuration settings, not full-blown objects. This is only here for backwards compatibility.

I hope that all makes sense.