I'm wondering how the php scripts are executed. I know that they are compiled into bytecode, and the bytecode is executed, but I don't know how that bytecode is executed, what executes that bytecode, etc... Can anybody answer that?
Asked
Active
Viewed 640 times
1
-
When I open the task manager on Windows (XAMPP), I don't see one process for each PHP script ;) – ComFreek Nov 14 '11 at 17:27
-
2PHP itself is executing the compiled script. That's why from the command line you execute PHP and give the script as a parm. The web server essentially does the same, executing PHP and giving it the script name. – Jonathan M Nov 14 '11 at 17:27
-
Depends on the SAPI. With Apache+mod_php it's typically one process per script/interpreter. As is it with FastCGI. Other setups (IIS) might use threads. What's the practical relevance for this question? – mario Nov 14 '11 at 17:29
-
I would give you the points mario if I could :-) Please create an answer from your comment! :-) – inf3rno Nov 17 '11 at 20:23
2 Answers
0
"Depends on the SAPI. With Apache+mod_php it's typically one process per script/interpreter. As is it with FastCGI. Other setups (IIS) might use threads." - mario

inf3rno
- 24,976
- 11
- 115
- 197