php op array,PHP手册 - Compile a string of PHP code and return the resulting op array

Example #1 parsekit_compile_string() example

$ops=parsekit_compile_string('

echo "Foo\n";

',$errors,PARSEKIT_QUIET);var_dump($ops);?>

以上例程会输出:

array(20) {

["type"]=>

int(4)

["type_name"]=>

string(14) "ZEND_EVAL_CODE"

["fn_flags"]=>

int(0)

["num_args"]=>

int(0)

["required_num_args"]=>

int(0)

["pass_rest_by_reference"]=>

bool(false)

["uses_this"]=>

bool(false)

["line_start"]=>

int(0)

["line_end"]=>

int(0)

["return_reference"]=>

bool(false)

["refcount"]=>

int(1)

["last"]=>

int(3)

["size"]=>

int(3)

["T"]=>

int(0)

["last_brk_cont"]=>

int(0)

["current_brk_cont"]=>

int(-1)

["backpatch_count"]=>

int(0)

["done_pass_two"]=>

bool(true)

["filename"]=>

string(17) "Parsekit Compiler"

["opcodes"]=>

array(3) {

[8594800]=>

array(5) {

["opcode"]=>

int(40)

["opcode_name"]=>

string(9) "ZEND_ECHO"

["flags"]=>

int(768)

["op1"]=>

array(3) {

["type"]=>

int(1)

["type_name"]=>

string(8) "IS_CONST"

["constant"]=>

&string(4) "Foo

"

}

["lineno"]=>

int(2)

}

["859484C"]=>

array(6) {

["opcode"]=>

int(62)

["opcode_name"]=>

string(11) "ZEND_RETURN"

["flags"]=>

int(16777984)

["op1"]=>

array(3) {

["type"]=>

int(1)

["type_name"]=>

string(8) "IS_CONST"

["constant"]=>

&NULL

}

["extended_value"]=>

int(0)

["lineno"]=>

int(3)

}

[8594898]=>

array(4) {

["opcode"]=>

int(149)

["opcode_name"]=>

string(21) "ZEND_HANDLE_EXCEPTION"

["flags"]=>

int(0)

["lineno"]=>

int(3)

}

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值