1、下载 VLD (Vulcan Logic Dumper)的源码 svn co svn://svn.xdebug.org/svn/php/vld/trunk vld
2、cd vld
3、phppath/php/bin/phpize
4 、./configure -- with-php-config=phppath/bin/php-config --enable-vld
5、make && make install
至此,VLD就安装完了。写个简单的test.php
php -dvld.active=1 ./test.php
会看到
Finding entry points
Branch analysis from position: 0
Return found
filename: /home/kaisha/study/php/test.php
function name: (null)
number of ops: 4
compiled vars: !0 = $a
line # * op fetch ext return operands
---------------------------------------------------------------------------------
2 0 > ASSIGN !0, '123'
3 1 ECHO !0
5 2 > RETURN 1
3* > ZEND_HANDLE_EXCEPTION
branch: # 0; line: 2- 5; sop: 0; eop: 3
path #1: 0,
查看PHP的opcode
最新推荐文章于 2022-06-25 13:18:32 发布