xdebug 安装:推荐用2.4的版本,其他高版本可能会有问题
下载地址:https://xdebug.org/download.php
tar xzf xdebug-2.4.0rc4.tgz
cd xdebug-2.4.0RC4/
/usr/local/Cellar/php70/7.0.19_11/bin/phpize
./configure --with-php-config=/usr/local/Cellar/php70/7.0.19_11/bin/php-config
make
make install
[xdebug]
zend_extension="/usr/local/Cellar/php70/7.0.19_11/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"
xdebug.profiler_output_dir=/usr/local/odp/log/profile
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
使用 XDEBUG_PROFILE 作为GET或者POST的参数即可生成性能报告文件,可以通过
http://sourceforge.net/projects/qcachegrindwin/ 打开文件
/usr/local/Cellar/php70/7.0.19_11/bin/php -d xdebug.profiler_enable=On ./index.php