Debug is a smart class for debugging in php. The outputs are sent to the browser or written in own files.
- Shows a lot of information about variables, scalar types and arrays as valid PHP code that can be used for testing
- Backtrace info (calling function / method / file with line numbers)
- Time (absolute and relative)
- Memory requirements
- Shows preview images for resources of the type gd
- Output to all web browsers without plugins
- Logging to a custom file
- Independent (Linux,Window, PHP from V5.6 up to V7.x)
Easy, just download and include the class file and and make outputs wherever you want.
require PATH_TO_CLASS.'class.debug.php';
$street = "Avenue des Champs-Élysées";
$array = [
"country" => "France",
"city" => "Paris",
"street" => $street,
];
debug::write('examples', $street, $array);
[18.12.2018 19:54:41,569](342k/362k) Debug::write "debugtest1.php Line 12 | ||
0 | string(8) ASCII | "examples" |
1 | string(27) UTF-8 | "Avenue des Champs-Élysées" |
2 | array(3) | array ( 'country' => "France" 'city' => "Paris", 'street' => "Avenue des Champs-Élysées", ) |