PHP Debug is a single file API for tracing PHP applications.
You can add, with minimal impact, diagnostics to be displayed upon program termination. Each diagnostic contains file, function and caller function information as well.
Just an API, not a class. Just include the debug.php file and add debug() calls throughout your code similar to var_dump(). However, the diagnostic messages are stored and displayed as a list at program termination. The diagnostics can be disabled and controlled in other ways.
It's small and simple yet very versatile and includes demonstration/testing code.
Here is the PHP Debug code. There is a Go debug, and a Perl debug, to be here soon.
The exit diagnostic messages have file/function/line data. The file is supposed to have the DOCUMENT_ROOT removed (i.e. "/srv/www/htdocs"); however, running in some environments this gets screwed up – e.g. command line or in Visual Studio Code with "Launch currently open script". (The latter case has really weird$_SERVER array data.)
Markup Language because it converts input text formatted like Markdown and produces HTML output like Markdown.pl and it's variants.
Processor because the input format is not hard-coded but defined as PHP data.
And Goofy because the code is a bit bloated and confusing (and the first format definition file was, well, goofy).
The PHP data – optionally supported by functions and/or closures – is specified on the command line:
./gmlp readme.md markdown > readme.htm
The PHP data to define "markup rules" is called a definition file. Included are files for Markdown, BBCode, HTML2MD, TXT2MD, CSS minify/unminify, strip comments and a few more as examples.
Here is the GMLP code archive. But first read the README; and view the basic algorithm GMLP PHP.
There are several, however, rite now they ain't documented (sorry). This code, though old and buggey, is something that I personally use quite offten for small, local tasks. And it is used to publish these posts on this Site.