Saturday 15 February 2014

c++ - How Does PHP's main.c Start Execution -


PHP 5.3.1 source was pinging around the tree, and decided to take a look. I was curious to know what was happening behind the scenes whenever PHP was running.

I was under the impression that any C or C ++ program starts execution in the main name function, but I do not see the function with that name in Main.c

How does the PHP code really begin (command-line vs. MOD_PHP versus CGI?), And I do not w / r / t what's missing the Main Function main.c file that I Answer this question next time?

I do not think I have ever seen a clear answer to that kind of question on the Internet, but you have a book May be interested in some of the paragraphs, which is probably the reference book when writing this PHP extension and internalizing the PHP engine.

In an ordinary webserver environment, you will not explicitly launch PHP interpreter; You will start Apache or some other web server that will load PHP and process scripts as necessary ...

And, after just:

.. CLI Binary actually behaves in the same way. A PHP command is inserted at the system prompt, launches "Command Line API", which acts as a mini-web server designed to serve a single request.

You might be able to find some pages, if you want to try reading a bit more ...


No comments:

Post a Comment