项目作者: trash07

项目描述 :
Simple PHP debuging tools and utils
高级语言: PHP
项目地址: git://github.com/trash07/simple-php-debuging.git
创建时间: 2018-05-08T17:12:20Z
项目社区:https://github.com/trash07/simple-php-debuging

开源协议:GNU General Public License v3.0

下载


simple-php-debuging

Simple PHP debuging tools and utils

Simple handy manual debuging utils

Install

  1. composer require trash07/simple-php-debuging --dev

Load dependencies

  1. require 'vendor/autoload.php'

Usage

  • Dumping
  1. $people = array('marc', 'john', 'liman');
  2. // what is the structure of $people ?
  3. _dump($people);
  • Debug
  1. $info = array('marc', 'john', 1);
  2. // readable $info array echo
  3. _debug($people);
  • Stopping execution
  1. // simple stop
  2. _stop();
  3. // stop with message
  4. _stop("Sorry we must stop");
  • Testing condition
  1. $r = 10; $s = 11;
  2. // test the condition of the if statement
  3. _condition($r > $s && $r < $s);
  4. if ($r > $s && $r < $s) {
  5. // do something ...
  6. }
  1. $r = 10; $s = 11;
  2. // test the condition of the if statement with message
  3. _condition($r > $s && $r < $s, "The $r, $s equality testing if");
  4. if ($r > $s && $r < $s) {
  5. // do something ...
  6. }
  • Seing if a line was executed
    1. // simple test
    2. _line();
    3. // _line() with message
    4. _line("Are we realy here ?");

License

GPL-3.0 © trash07