Replace print_r by var_dump. Add limit to var_dump output (memory use failsafe). Add frame count limit to args output. Cleaner (?) code.