Home > php教程 > php手册 > PHP 使用 VarDumper 进行优雅调试

PHP 使用 VarDumper 进行优雅调试

WBOY
Release: 2016-06-07 11:34:20
Original
1010 people have browsed it

PHP 使用 VarDumper 进行优雅调试。
1. 使用截图
PHP 使用 VarDumper 进行优雅调试

2.安装方法
1)安装 composer.
//安装Composer,如果已经安装过,可不必再安装
curl -s http://getcomposer.org/installer | php

2)下载 var-dumper.
//全局安装
php composer.phar require symfony/var-dumper

3)配置php.ini.
//在 php.ini 中找到 auto_prepend_file
auto_prepend_file = "/安装的文件夹/vendor/autoload.php"

4)重启环境.

5)使用方法.
$arr['name'] = 'Tom';
$arr['age'] = '23';
$arr['sex'] = '男';
$arr['hobby'] = ['爬山','看书','游泳'];
dump($arr);

更多【干货】,请关注一位有情怀的工程师。

PHP 使用 VarDumper 进行优雅调试

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template