Sometimes I want to see all the constants I have defined. Here is some diagnostic PHP I use for displaying all user-defined constants.
Diagnostic PHP: Get All User Functions
Sometimes I want to see all the user-defined functions that are in memory when a page loads. Maybe the page doesn’t need certain functions and I can realize performance improvements by removing them. And sometimes — I’m being candid here — I copy functions from one application into a library file for another and don’t need any of them for the current application. This function, offering some diagnostic PHP, helps.
Diagnostic PHP: Get All Included Files
Sometimes when developing, it’s helpful to echo some diagnostic information to the screen. Here’s some simple diagnostic PHP I use for displaying all included files.