Writing a PHP extension in something other than C or C++

流过昼夜 提交于 2019-12-23 06:17:07

问题


I'm thinking of writing a PHP extension module but can't tolerate the idea of messing with C or, for that matter, C++. I know that some languages provide compatibility with C APIs, Pascal being one of them, sorry for mentioning it. And I quite suppose that, since the days of Wirth, a further number of languages have appeared that ditch the memory juggling but keep being compiled to native binaries and provide interoperability with all the other programs and libraries out there. Only I didn't follow this side of the trade.

So, if you know of any such languages, which one would you recommend for a script-kiddie who would happily spend the remainder of his life not dereferencing a pointer ever again? Preferably a language that doesn't take a year to learn.

Objective C? Maybe Perl or Python might be somehow bent to do something like that, throwing the standard library away, of course?

My platform is Linux, btw.

Or am I missing something and the task of generating a PHP extension requires far more than C compatibility and I would end up rewriting Zend APIs in the target language?

P.S. I'm aware of PHP modules that integrate it with Java and Perl and a number of other things. But for now, I'm interested in writing a real, full-blown native code extension that doesn't use any interpreters or virtual machines.

来源:https://stackoverflow.com/questions/12189160/writing-a-php-extension-in-something-other-than-c-or-c

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