xicrow/php-debug

PHP debugging tools

5.0.0 2023-02-17 23:27 UTC

README

Debugging tools for PHP

Scrutinizer Code Quality Scrutinizer Code Coverage Scrutinizer Build Status

Packagist Latest Stable Version Packagist Total Downloads

Installation

The recommended way to install is through Composer:

composer require xicrow/php-debug:~5.0

OR

composer require --dev xicrow/php-debug:~5.0

Optionally add it to your composer.json file:

{
	"require": {
		"xicrow/php-debug": "~5.0"
	}
}

OR

{
	"require-dev": {
		"xicrow/php-debug": "~5.0"
	}
}

Example

See examples in the demo folder.

View the seperate readme for:

TODO

  • Debug functions for displaying variable information, pr(), vd(), etc.
    Implemented, available in Debugger class
  • Collection class for Timer::$timers, and maybe others
    Implemented, available in Collection class
    Removed, too memory hungry
  • Memory class for measuring memory usage
    Implemented, available in Memory class
    Removed, too unreliable
  • Improve Timer and Memory, perhaps a Profiler class
    Implemented, available in Profiler class
    Removed, along with Memory
  • Add PHPunit tests
    Implemented, now remeber to keep them updated
  • Improve Debugger, foldable tree of arrays/objects
    Skipped, not sensible to do, clutter with either HTML or JS/CSS
  • Groupable timers, timers with the same name will be grouped and min, max and average will be calculated (activate when stopping a timer)
  • Update example demo output in Debugger and Timer README
  • Update to PHP 7.4 Done Implemented type declarations, return types, etc. Implemented type prefixed variables
  • Change option arrays to explicit variables or option classes Fixed in most places, just need the rest

License

Copyright © 2018 Jan Ebsen Licensed under the MIT license.