{"repo":"spatie/backtrace","free":true,"listed":false,"github":"https://github.com/spatie/backtrace","clone":"git clone https://github.com/spatie/backtrace.git","description":"A better backtrace","language":"PHP","stars":438,"topics":["php","debugging"],"license":"MIT","category":"dev-tools","readme_excerpt":"A better PHP backtrace To get the backtrace in PHP you can use the debug backtrace function. By default, it can be hard to work with. The reported function name for a frame is skewed: it belongs to the previous frame. Also, options need to be passed using a bitmask. This package provides a better way than debug backtrace to work with a back trace. Here's an example: Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: Usage This is how you can create a backtrace instance: Getting the frames To get all the frames you can call frames . A Spatie\\Backtrace\\Frame has these properties: - file : the name of the file - lineNumber : the line number - arguments : the arguments used for this frame. Will be null if withArguments was not used. - class : the class name for this frame. Will be null if the frame concerns a function. - method : the method used in this frame - object : the object when the frame is in an object context (method call, closure bound to object, arrow function which captured $this , etc.). Will be null if withObject was not used. - applicationFrame : contains true is this frame belongs to your applic","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/backtrace/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}