如何查看php字节码文件 [英] How to see php bytecode file

查看:171
本文介绍了如何查看php字节码文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这样做是出于学习目的。
我浏览过很多文章,这些文章首先将php的源代码转换为字节码,但是我找不到找到字节码格式的方法,它看起来像什么?

I am doing it for learning purpose. I have gone through many articles that php first convert its source code to bytecode, but i am not able to find a way to see the bytecode format, that how it looks like?

在Java和C语言中,有很多查看字节码文件的方法。但无法在php中找到任何文章来查看转换后的字节码。

In java and C there are many ways to see bytecode file. but unable to find any article in php to see converted bytecode.

推荐答案

要将PHP代码转换为操作码列表,您可以使用 vld ,即 Vulcan逻辑转储程序 (在 GitHub PECL )。

To turn PHP code into a list of opcodes, you can use vld, the "Vulcan Logic Dumper" (available on GitHub and PECL).

PHP文档还维护了操作码列表

The PHP documentation also maintains a list of opcodes.

也可用 3v4l.org ,它允许您输入PHP代码并在其结果页上查看 vld 转储的一部分。

Also available is 3v4l.org, which allows you to input PHP code and view part of the vld dump on its results page.

这篇关于如何查看php字节码文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆