git clone https://gist.github.com/8578209.git try-patchwork-dumper
cd try-patchwork-dumper
composer install
php test-cli.php
Last active
January 4, 2016 05:49
-
-
Save nicolas-grekas/8578209 to your computer and use it in GitHub Desktop.
Playing Patchwork CLI Color Dumper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class a | |
{ | |
public $b = 'b'; | |
protected $c = 'c'; | |
private $d = 'd'; | |
} | |
$g = opendir('.'); | |
$h = opendir('.'); | |
closedir($h); | |
$a = array( | |
'number' => 1, 1.1, | |
'const' => null, true, false, NAN, INF, -INF, PHP_INT_MAX, | |
'str' => "déjà", utf8_decode('déjà'), | |
'[]' => array(), | |
'res' => $g, $h, | |
'obj' => new a, | |
'nobj' => array(new a), | |
'closure' => function($a, \PDO &$b = null) {}, 'line' => __LINE__, | |
implode('', range("\0", "\x7F")) => implode('', range("\0", "\x7F")), | |
); | |
$r = array(); | |
$r[] =& $r; | |
$a['recurs'] =& $r; | |
$a[] =& $a[0]; | |
$a['sobj'] = $a['obj']; | |
$a['snobj'] =& $a['nobj'][0]; | |
$a['snobj2'] = $a['nobj'][0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "nicolas-grekas/try-patchword-dumper", | |
"authors": [ | |
{ | |
"name": "Nicolas Grekas", | |
"email": "[email protected]" | |
} | |
], | |
"require": { | |
"patchwork/error-logger": "dev-master@dev" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_readme": [ | |
"This file locks the dependencies of your project to a known state", | |
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" | |
], | |
"hash": "7a01360a7e74eddcbb487298a6daa7c8", | |
"packages": [ | |
{ | |
"name": "patchwork/error-logger", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/nicolas-grekas/Patchwork-Error-Logger.git", | |
"reference": "3eeb649f05acb31eb03889e7cd7c77b0ed95bb20" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/nicolas-grekas/Patchwork-Error-Logger/zipball/3eeb649f05acb31eb03889e7cd7c77b0ed95bb20", | |
"reference": "3eeb649f05acb31eb03889e7cd7c77b0ed95bb20", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.0" | |
}, | |
"type": "library", | |
"autoload": { | |
"psr-0": { | |
"Patchwork": "class/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"(Apache-2.0 or GPL-2.0)" | |
], | |
"authors": [ | |
{ | |
"name": "Nicolas Grekas", | |
"email": "[email protected]", | |
"role": "Developer" | |
} | |
], | |
"description": "Advanced PHP error handling and high accuracy JSON logging", | |
"homepage": "https://github.com/nicolas-grekas/Patchwork-Error-Logger", | |
"keywords": [ | |
"dump", | |
"error", | |
"exception", | |
"json", | |
"log", | |
"logging" | |
], | |
"time": "2014-01-30 09:35:16" | |
} | |
], | |
"packages-dev": [ | |
], | |
"aliases": [ | |
], | |
"minimum-stability": "stable", | |
"stability-flags": { | |
"patchwork/error-logger": 20 | |
}, | |
"platform": [ | |
], | |
"platform-dev": [ | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Patchwork\PHP\CliColorDumper as d; | |
require __DIR__ . '/a.php'; | |
d::dump($a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Patchwork\PHP\JsonDumper as d; | |
require __DIR__ . '/a.php'; | |
d::dump($a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/a.php'; | |
var_dump($a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment