gpt4 book ai didi

php - 如何获取 PHP 的操作码?

转载 作者:IT老高 更新时间:2023-10-28 11:56:43 26 4
gpt4 key购买 nike

  <?php
$show_value = 123;
echo 'sing_quote'.$show_value;
echo "double_quote{$show_value}";

?>

它的操作码是:

1: <?php
2: $show_value = 123;
0 ASSIGN !0, 123
3: echo 'sing_quote'.$show_value;
1 CONCAT 'sing_quote', !0 =>RES[~1]
2 ECHO ~1
4: echo "double_quote{$show_value}";
3 ADD_STRING 'double_quote' =>RES[~2]
4 ADD_VAR ~2, !0 =>RES[~2]
5 ECHO ~2
6 RETURN 1

最佳答案

查看 Vulcan Logic Disassembler PECL 扩展 - 见 author's home page了解更多信息。

The Vulcan Logic Disassembler hooks into the Zend Engine and dumps all the opcodes (execution units) of a script. It was written as as a beginning of an encoder, but I never got the time for that. It can be used to see what is going on in the Zend Engine.

安装后,您可以像这样使用它:

php -d vld.active=1 -d vld.execute=0 -f yourscript.php

另见interesting blog post on opcode extraction ,以及 PHP manual page listing the available opcodes .

关于php - 如何获取 PHP 的操作码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1795425/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com