PRINT DEBUGGING FOR LIFE 🐾
trace() Takes any number of arguments and datatypes and attempts to use JSON to render them to the error log.
tracef() Prints context and arguments of current function.
Example:
class Foo {
public function SomeFunction($bar){
tracef();
}
}
(new Foo())->SomeFunction("Hello World!");Output:
"Foo->SomeFunction" ["Hello World!"]