var_export
function causes an exception while argument has circular references. Are there any alternatives (except serialize
) which handle it correctly?
You could try this :
ob_start();
var_dump($var);
$dump = ob_get_contents();
ob_end_clean();
And why can't you use serialize ?
Are you looking for var_dump or even debug_backtrace
Update:
Converting object to string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With