Adapt the Dump server of Symfony to Yii.

The project address

  • Github.com/guanguans/y…

Environmental requirements

  • Yii > = 2.0

The installation

$ composer require guanguans/yii-var-dumper -v
Copy the code

configuration

Add to config/main.php:

.'bootstrap'  => [
	...
	'dumper'. ] .'modules'  => [
	...
	'dumper'= > ['class'= >'Guanguans\YiiVarDumper\Module'./ / 'host' = > 'TCP: / / 127.0.0.1:9913',],... ] .Copy the code

use

Is up and runningdump server

$ php yii dumper/server
Copy the code

Use the –format option to set the output format to HTML

$ php yii dumper/server --format=html > dump.html
# or
$ php yii dumper/server -f=html > dump.html
Copy the code

Debug output your variables


      
dump($yourVariate);
Copy the code

The output

A link to the

  • Github.com/symfony/var… , by symfony
  • Github.com/beyondcode/… , by beyondcode