Use PHP to expand vld to view PHPopcode. First download the latest version of vld extension: Copy the code as follows :~ Public_htmlphp-5.3.13extwgetpecl.php.netgetvld-0.11.2.tgz ~ Public_htmlphp-5.3.13exttarzxvfvld-0.11. first download the latest vld extension:
The code is as follows:
~ /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> vld-0.11.2/cd/
Next, compile and install the vld extension:
The code is as follows:
~ /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 install
Installing 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:
The code is as follows:
~ /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:
The code is as follows:
Extension = vld. so
Next, create the test. php file:
The code is as follows:
$ A = "hello world ";
Echo $ a. PHP_EOL;
Run cli to view the generated opcode:
The code is as follows:
~ /Public_html> php-dvld. active = 1 test. php
Finding entry points
Branch analysis from position: 0
Return found
Filename:/home/zhanhailiang/public_html/test. php
Function name: (null)
Number of ops: 4
Compiled vars :! 0 = $
Line # * 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: 3
Path #1: 0,
Hello world
The pipeline code is as follows :~ // 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 ....