var_export
function causes an exception while argument has circular references. Are there any alternatives (except serialize
) which handle it correctly?
views:
80answers:
2I want to convert object to string. var_dump outputs it, I don't need this
darja
2010-04-21 12:40:54
@darja: The only other way i know of is serializing it (although you say except it). See my updated answer as well.
Sarfraz
2010-04-21 12:46:00
@Sarfraz Thanks for link. It sounds that I have two variants - serialize (which I don't want) and json_encode.
darja
2010-04-21 13:50:19
@darja: yes it seems to be so. Thanks...
Sarfraz
2010-04-21 13:52:51