PHP: How it works

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
EricKatz
Forum Newbie
Posts: 1
Joined: Tue Jan 20, 2004 12:55 pm

PHP: How it works

Post by EricKatz »

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]
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

if you want lots of detail you are probably stuck with the source, the comments within isnt allways that great.. Never heard of a book about the php source....

what are you interrested in? building or modifying an extension?
User avatar
Meteo
Forum Newbie
Posts: 24
Joined: Sun Jan 18, 2004 10:19 am
Contact:

Post by Meteo »

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.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

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.
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.

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
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

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! :)
Post Reply