solupro / opd

PHP Opcode dumper like vld

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opd

PHP Opcode dumper like vld but base on based on PHP embed sapi

##Install Build PHP with Emebed SAP

$ cd php-src/
$ ./configure --enable-embed
$ make && make install

Modify the Makefile LDFLAGS where is your libphp5.so[or libphp5.dylib]
Compile

$make 

##Example test.php

<?php
function foo($str) {
    echo $str;
}

$str = "hello world\n";
foo($str);

execute ./opd test.php

Script: test.php
opnum	line	opcode	op1	op2	result
0	2	NOP			
1	6	ASSIGN	!0	"hello+world%0A"	
2	7	SEND_VAR	!0		
3	7	DO_FCALL	"foo"		
4	8	RETURN	1

##Blog (in Chinese)

About

PHP Opcode dumper like vld

License:The Unlicense


Languages

Language:C 98.9%Language:C++ 0.9%Language:Objective-C 0.2%Language:PHP 0.0%