PHP程序员学习笔记|如何学习PHP

个人总结的PHP学习方法


MAC 下编译VLD 查看opcode

2016-7-24 0phpcom 学习笔记


本机环境 OSX 10.10.4

XAMPP

php 5.4


下载 VLD插件

从文档上看我们应该下载 0.11.1 5.4支持版

wget http://pecl.php.net/get/vld-0.11.1.tgz

tar -zxvf vld-0.11.1.tgz

生成 configure

/Applications/XAMPP/xamppfiles/bin/phpize ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

make && make install

php.ini 添加 配置

[vld]

extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20100525/vld.so;

使用:

[apple:/]$ php -dvld.active=1 1.php

Finding entry points

Branch analysis from position: 0

Return found

filename:       /3haogou/1.php

function name:  (null)

number of ops:  4

compiled vars:  none

line     # *  op                           fetch          ext  return  operands

---------------------------------------------------------------------------------

   2     0  >   EXT_STMT                                                 

         1      ECHO                                                     'hello+world%21'

   4     2      EXT_STMT                                                 

         3    > RETURN                                                   1

branch: #  0; line:     2-    4; sop:     0; eop:     3

path #1: 0, 

hello world!%    


0.13.0 - PHP 5.6 and PHPNG (preliminary) compatibility
- Fixed issues with brk/cnt
- Fixed memory leaks 
- Support for showing entry and exit points when generating dot files
0.12.0 - PHP 5.5 compatibility
0.11.2 - Fixed some crash fixes (Felipe Pena)
- Display the constant value if we know it
0.11.1 - PHP 5.4 support
0.11.0 - PHP 5.4 support
0.10.1 - SEND_VAR_NO_REF needs to use extended value (Patch by Graham K.)
- Fix build with 5.3 and trunk.
- Added Zoë's patch for CVS style formatting.
- Added the closures opcode
- Added a path finding algorithm.
- Added an option (vld.dump_paths) that dumps branch and paths when turned on.
- Added two options (vld.save_dir and vld.save_paths) that allows you to 
dump path information has a graphviz .dot file.
- TSRM fixes (by Wojciech Meler ).
0.10.0 - SEND_VAR_NO_REF needs to use extended value (Patch by Graham K.)
- Fix build with 5.3 and trunk.
- Added Zoë's patch for CVS style formatting.
- Added the closures opcode
- Added a path finding algorithm.
- Added an option (vld.dump_paths) that dumps branch and paths when turned on.
- Added two options (vld.save_dir and vld.save_paths) that allows you to 
dump path information has a graphviz .dot file.
- TSRM fixes (by Wojciech Meler ).
0.9.1 - Fixed a few segfaults in branch analyzation.
- Fixed HEAD compilation.
0.9.0 Lots of fixes and improvements.
0.8.0 Bring this up-to-date with latest PHP 5.1-dev.
0.7.0 This release adds a lot of Zend Engine 2 support, fixes some
bugs and changes the way on how VLD is activated. Only if the
configure setting "vld.active" is set to "1" it will dump the
op arrays.

« 拿代码量算KPI……跟程序员们来这套? | 三号柜部署文档»
发表评论:


订阅Rss