I wanted a simple way to debug memory usage in a Laravel or simple PHP project. Something I can just drop into my code without packages, extensions or what not. This little helper does what I need.
- Create a helpers.php (see below) where ever you want.
- Add the helper file to your composer.json in the autoload/files section.
"autoload": {
"files": [