I'm looking for a method of having my exception handler dump the local variables of the function which the exception was raised in. Is this possible?
get_defined_vars()
will return an array of all defined variables. You can then loop through each one and dump the contents, or use var_dump( get_defined_vars() )
to dump them en masse.
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