added namespaces
fixed string rendering (added support for unicode strings) And other minor fixes PS droped compatibility with php 4
This commit is contained in:
parent
1662b22231
commit
62df2b9155
5 changed files with 296 additions and 258 deletions
1
.php_cs
1
.php_cs
|
@ -13,4 +13,3 @@ return Symfony\CS\Config\Config::create()
|
|||
->fixers(array('-indentation','-braces','-psr0','-controls_spaces'))
|
||||
->finder($finder)
|
||||
;
|
||||
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
dBug
|
||||
====
|
||||
|
||||
my mod of dBug
|
||||
A debug output library which is used to visualize different datatypes.
|
||||
Initially was developed by ospinto.
|
||||
|
||||
For more info visit [http://kolanich.github.com/dBug/]
|
||||
|
||||

|
||||
|
||||
## Very very brief list of features
|
||||
|
||||
PHP version of ColdFusion’s cfdump.
|
||||
Extended PHP version of ColdFusion’s cfdump.
|
||||
|
||||
Outputs colored and structured tabular variable information.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name" : "KOLANICH/dBug",
|
||||
"type" : "library",
|
||||
"description" : "A debug output library which is used to visualize different datatypes.",
|
||||
"keywords" : ["debug", "output", "table", "visualization"],
|
||||
"keywords" : ["debug", "output", "table", "visualization","cfdump","ColdFusion"],
|
||||
"homepage" : "https://github.com/KOLANICH/dBug",
|
||||
"license" : "GPL-2.0",
|
||||
"authors" : [{
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
],
|
||||
"require" : {
|
||||
"php" : ">=4.1.0"
|
||||
"php" : ">=5.2"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-Reflection" : "to show protected and private info (now is only implemented for Exceptions)"
|
||||
|
|
49
tests.php
49
tests.php
|
@ -1,5 +1,10 @@
|
|||
<?
|
||||
include_once(__DIR__.'/dBug.php');
|
||||
<?PHP
|
||||
namespace dBug\tests;
|
||||
ini_set('display_errors',1);
|
||||
error_reporting(E_ALL ^E_NOTICE);
|
||||
header('Content-Type: text/html;charset=utf-8;');
|
||||
include_once(__DIR__.'/dBug.php');
|
||||
use dBug\dBug;
|
||||
$a="The quick brown fox jumps over the lazy dog\nThe five boxing wizards jump quickly.\r\nСъешь же ещё этих мягких французских булок, да выпей чаю\n";
|
||||
new dBug($a);
|
||||
$a='vodka';
|
||||
|
@ -28,26 +33,28 @@
|
|||
new dBug($variable);
|
||||
class Vegetable {
|
||||
|
||||
var $edible;
|
||||
var $color;
|
||||
function Vegetable($edible, $color="green") {
|
||||
$this->edible = $edible;
|
||||
$this->color = $color;
|
||||
}
|
||||
var $edible;
|
||||
var $color;
|
||||
function Vegetable($edible, $color="green") {
|
||||
$this->edible = $edible;
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
function is_edible() {
|
||||
return $this->edible;
|
||||
}
|
||||
function is_edible() {
|
||||
return $this->edible;
|
||||
}
|
||||
|
||||
function what_color() {
|
||||
return $this->color;
|
||||
}
|
||||
function what_color() {
|
||||
return $this->color;
|
||||
}
|
||||
}
|
||||
new dBug(new Vegetable("spinach"));
|
||||
$a=curl_init("http://github.com/");
|
||||
new dBug($a);
|
||||
|
||||
class myExc extends Exception{
|
||||
$a=curl_init("https://github.com/");
|
||||
new dBug($a);
|
||||
//curl_exec($a);
|
||||
//new dBug($a);
|
||||
|
||||
class myExc extends \Exception{
|
||||
private $priv="PREVED";
|
||||
protected $ololo="trololol";
|
||||
public $num=0;
|
||||
|
@ -58,12 +65,12 @@
|
|||
};
|
||||
try{
|
||||
throw new myExc("MedVed");
|
||||
}catch(Exception $e){
|
||||
}catch(\Exception $e){
|
||||
new dBug($e);
|
||||
}
|
||||
try{
|
||||
throw new Exception("hahahahaha");
|
||||
}catch(Exception $e){
|
||||
throw new \Exception("hahahahaha");
|
||||
}catch(\Exception $e){
|
||||
new dBug($e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue