Given below is an image of a basic PHP web server architecture:

PHP web server architecture

Would someone please explain the several components available and how they interact?
I'm more concerned of how the PHP Core operates and relates to the other components, so feel free to elaborate on this point specifically.

This Diagram was taken from here.

  • You'll need to clarify: 1) What do you mean by PHP core functions, 2) What exactly you are asking. Also, what's the source of the image? – yannis Oct 31 '12 at 14:06
  • Isn't PHP open-source? You might want to look at the code and then if you don't understand, ask specific questions about what is unclear to you. – marco-fiset Oct 31 '12 at 14:07
  • Please check the Updated question – OM The Eternity Oct 31 '12 at 14:13
  • I am not concerned about the code of PHP, here I am focussed on PHP as a whole, I need to know What makes the PHP Run – OM The Eternity Oct 31 '12 at 14:14
  • 1
    @OMTheEternity Ok then, this presentation might help clarify things a bit. – yannis Oct 31 '12 at 14:21

Very roughly:

  • SAPI transfers (and translates) the data received by the http daemon (but not necessarily only it, see Wikipedia) to the PHP framework
  • PHP Core is the "basic" functionality provided by the language (e.g. what allows you to use echo $variable)
  • PHP API is additional functionality you can use to access separate services (e.g. a database) - the exact line between those two is a bit fuzzy (imho)
  • ZEND is the engine that actually executes the PHP scripts (compiler and runtime environment) - see wikipedia again.
  • As I understand it, PHP API is the functionality you get through the extensions: mbstring, PDO, APC, Streams, etc., and PHP core is everything else, i.e. everything available in native PHP with no extensions. I'm not editing the answer since I'm not sure if my understanding is correct. – Arseni Mourzenko Oct 31 '12 at 20:04
  • I think that's right, but I'm not a PHP guru. For me this is really fuzzy since many of the extensions are bundled with PHP by default. – peterph Oct 31 '12 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.