开发者

Learn C or C++ for php extensions

I have been programming for a while now in php and want to broaden my knowledge of programming by learning another language whilst hopefully in the process getting better at php also.

One way to do this would be to look at writing extensions for php which would be in c or c++.

Can anyone say which language would be better to focus on for this task?

I know the languages are very similar and that c++ allows for object orientated code but would c be faster and more suited to p开发者_如何学编程hp extensions?


This might help you: http://devzone.zend.com/article/1021 (with more than the answer to you question).

This tutorial assumes basic familiarity with both the PHP language and the language the PHP interpreter is written in: C.

So you can't use C++. If you want to use C++ you should take a look at this article.
Thank you Christoph for pointing this out.


The php interpreter is written in C, and the APIs are all in C already. C is the only choice in this case.

Plus, you already know object oriented paradigms from learning php it sounds like, so why not jump into the procedural programming world with C?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜