How does PHP work? I have been programming in PHP for some time, and I am interested in the lower-level details. Does anyone know of a site or a book that explains the inner workings of PHP in lots of detail?
Thanks,
Eric[/google]
PHP: How it works
Moderator: General Moderators
it works like any other programming language,
programming languages need either compilers or translators to understand the programming. a compiler already has the code read, and the code is ready to be ran. most programs run on the computer have been compiled. a translator program reads through the lines while it parses the programming. php is a translation language, because it goes one line at a time while parsing in the browser.
when the browser sees a <?php, it sends all the information to the translator in between the <?php and ?> tags, and the translator translates it into html which is viewable by the web browser, it's that simple really.
programming languages need either compilers or translators to understand the programming. a compiler already has the code read, and the code is ready to be ran. most programs run on the computer have been compiled. a translator program reads through the lines while it parses the programming. php is a translation language, because it goes one line at a time while parsing in the browser.
when the browser sees a <?php, it sends all the information to the translator in between the <?php and ?> tags, and the translator translates it into html which is viewable by the web browser, it's that simple really.
That's actually somewhat inaccurate, and definitely over-simplified, and the original poster wanted low-level (NOT simplified) details about the inner workings of PHP.Meteo wrote:it works like any other programming language,
programming languages need either compilers or translators to understand the programming. a compiler already has the code read, and the code is ready to be ran. most programs run on the computer have been compiled. a translator program reads through the lines while it parses the programming. php is a translation language, because it goes one line at a time while parsing in the browser.
when the browser sees a <?php, it sends all the information to the translator in between the <?php and ?> tags, and the translator translates it into html which is viewable by the web browser, it's that simple really.
A few fantastic resources to help the poster with his request:
- Zend and extending PHP - a great in-depth look at the C underpinnings of PHP and how to extend it
- Zend API - The full API for PHP and Zend to allow for extending PHP in new and novel ways
Its quite a while since I looked for this stuff and I hadnt seen the derickrethans site before, that looks a very good way of finding some key pieces! 