Using Hiphop for PHP extension development

我的未来我决定 提交于 2019-11-28 05:51:02

问题


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.


回答1:


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? :)



来源:https://stackoverflow.com/questions/7646276/using-hiphop-for-php-extension-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!