Making use of C++ to speed up PHP

前端 未结 7 755
故里飘歌
故里飘歌 2020-12-30 06:16

I saw this post on Sitepoint quoting a statement by Rasmus Lerdorf which goes (according to Sitepoint) as follows:

How can you make PHP fast? Well, yo

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 06:55

    For large calculation and processing C++ can be used with php. And for lighter process only PHP is enough.

    While working on data processing or calculation based applications C++ can help. Please not you have to use one trick here.

    One need to create server(daemon) process which keep listerning for the request. This daemon process is already compiled and it contains processing code.

    So when there is any request to process the data it will do it much faster then PHP and reply back with result.

    One can use exec or similar function to execute daemon executable.

提交回复
热议问题