Use PHP to expand vld to view PHPopcode-php Tutorial

Source: Internet
Author: User
Tags zts
Use PHP extension vld to view PHPopcode author: zhanhailiang date: first download the latest version of vld extension :~ Public_htmlphp-5.3.13ext & gt; wgetpecl. php. netgetvld-0.11.2.tgz ~ Public_htmlphp-5.3.13ext & gt use PHP extension vld to view PHP opcode

Author: zhanhailiang date:

First download the latest vld extension:

~/public_html/php-5.3.13/ext> wget http://pecl.php.net/get/vld-0.11.2.tgz~/public_html/php-5.3.13/ext> tar zxvf vld-0.11.2.tgz ~/public_html/php-5.3.13/ext> cd vld-0.11.2/

Next, compile and install the vld extension:

~/public_html/php-5.3.13/ext/vld-0.11.2> phpize ~/public_html/php-5.3.13/ext/vld-0.11.2> ./configure --with-php-config=/usr/local/services/php/bin/php-config --enable-vld~/public_html/php-5.3.13/ext/vld-0.11.2> make~/public_html/php-5.3.13/ext/vld-0.11.2> sudo make installInstalling shared extensions:     /usr/local/services/php/lib/php/extensions/no-debug-non-zts-20090626/

Finally, copy the generated vld. so to the extension_dir Directory:

~/public_html/php-5.3.13/ext/vld-0.11.2> cd /usr/local/services/php/lib/php/extensions/no-debug-non-zts-20090626//usr/local/services/php/lib/php/extensions/no-debug-non-zts-20090626> sudo cp vld.so /usr/local/services/php/extensions/

Modify the php. ini file and add the following configuration:

extension=vld.so

Next, create the test. php file:

 

Run cli to view the generated opcode:

~/public_html> php -dvld.active=1 test.php Finding entry pointsBranch analysis from position: 0Return foundfilename:       /home/zhanhailiang/public_html/test.phpfunction name:  (null)number of ops:  4compiled vars:  !0 = $aline     # *  op                           fetch          ext  return  operands---------------------------------------------   3     0  >   ASSIGN                                                   !0, 'hello+world'   5     1      CONCAT                                           ~1      !0, '%0A'         2      ECHO                                                     ~1   6     3    > RETURN                                                   1 branch: #  0; line:     3-    6; sop:     0; eop:     3path #1: 0, hello world

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.