This library provides functions that are useful during development. They perform a variety of tasks, but centre around flushing data to the buffer in raw-form to resolve some issue.
I developed this library to have quick shortcuts to common used logic/functions.
More than anything, it was to save me some time during the development/debugging process, and have all these functions (which are primarily only used during development) decoupled from any framework-level logic.
This project includes a series of functions (currently 8) which, for the most part, print statements to the output buffer in order to assess a point in code. These specific functions are:
backtracePrints a backtrace up until that point in code in a friendly way
elLogs the passed in argument to the error log. Acts as a shortcut/alias of
elxDoes as above, but then exits the script immediately
exExits the script immediately with a status of
0(alias of the exit function)
prActs as an alias for the
print_rfunction, however wraps the output in
pretags to make it more readable
prxActs as an alias of the
prfunction, followed by the
vdActs as an alias of the
var_dumpfunction (accepts multiple parameters). Outputs the variable value and type
vdxActs as an alias of the
vdfunction, followed by the
These functions are primarily used during development. An exception to this is
el function which I may use during recoverable errors.
Simply use it during your flow, functionally, checking out the function documentation for appropriate parameter types and return values.
I thought about building these functions directly into the TurltePHP framework, but wanted to have them available for really small projects, applications or scripts. While not all of these need to be used exclusively under the label of debugging, I thought they would fall suitably well there.
There we go.
Up next, PHP-SecureSessions.