Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6961626
  • 博文数量: 701
  • 博客积分: 10821
  • 博客等级: 上将
  • 技术积分: 12021
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-02 10:41
个人简介

中科院架构师,专注企业数字化各个方面,MES/ERP/CRM/OA、物联网、传感器、大数据、ML、AI、云计算openstack、Linux、SpringCloud。

文章分类

全部博文(701)

分类: PHP

2015-08-08 20:19:50

# wget /> # tar zxvf vld-0.10.1.tgz
# cd ./vld-0.10.1
# /usr/local/php/bin/phpize              或者直接phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-vld
# make && make install

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

编辑php.ini文件激活vld扩展:

extension=vld.so

 

重启Apache:
# /usr/local/apache2/bin/apachectl restart
--------------------------------- 

至此,VLD就安装完了。写个简单的test.php

<?php $a='123'; echo $a;?>

 

# php -dvld.active=1 ./test.php

如果没有设置php环境变量的话

#/usr/local/php/bin/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,

阅读(3903) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~