使用 Hiphop 进行 PHP 扩展开发
Hiphop将PHP转换为C++代码,有人用它进行PHP扩展开发吗?
我发现以下链接可以使用 C++ 编写 PHP 扩展 http://devzone.zend.com/article /4486-Wrapping-C-Classes-in-a-PHP-Extension
我想编写一些 PHP 类并将它们转换为 C++ 并在 PHP 扩展中使用它。
如果有人这样做,请告诉我,也欢迎任何想法。
Hiphop converts PHP into C++ code, did anyone used it for PHP extension development?
I have found following link to write PHP extensions using C++
http://devzone.zend.com/article/4486-Wrapping-C-Classes-in-a-PHP-Extension
I want to write some PHP classes and convert them into C++ and use it in PHP extension.
Please let me know if anyone did that and also any thoughts are welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,HipHop 的目的是绕过 PHP 的虚拟机 Zend Engine。
为了创建 PHP 扩展,您必须连接到 Zend 引擎。
因此,如果 HipHop 绕过 ZE 执行的执行,我不知道如何创建一个 PHP 类,将其转换为 C++ 类,然后用于创建扩展。
HipHop 不会转换 PHP 源代码,而是转换 BYTE 代码。这是一个巨大的差异,如果是前者……是否需要使用另一种语言? :)
As far as I know, the point of HipHop is to bypass PHP's Virtual Machine known as Zend Engine.
In order to create a PHP extension, you have to hook into the Zend Engine.
So if HipHop bypasses the execution done by ZE, I don't see how it'd be possible to create a PHP class that gets translated to C++ one that would then be used to create an extension.
HipHop doesn't convert PHP source code, it converts the BYTE code. It's a huge difference, if it were the former.. would there be a need for using another language? :)