Wednesday 15 October 2008

Die interne Funktionsweise von PHP


Abstract


This paper looks into the internal workings of PHP, a programming language that is used to generate and control the output of a webserver. In order to understand the fundamental internal processes of PHP and their causes, the structure of the Internet with focus on the Web is herein described. With this knowledge it is possible to easily understand the roles of PHP's components.
The execution flow of PHP is dissected alongside the layout of its source code repository and a couple of key functions and their roles. Syntactic analysis of the PHP script at runtime is pertinent to an understanding of the system and thus the importance of grammar is also adressed. Since PHP is very complex and a complete study would go beyond the scope of this paper, methods of independent analysis are also presented.
The execution flow of PHP is dissected in parallel with the layout of the PHP source code repository and a couple of key functions and their roles, are presented. Syntactic analysis of the PHP script at runtime is pertinent to an understanding of the system as a whole and thus the importance of grammar is also adressed.
Lastly, it is shown with an extension how the PHP-runtime can be enhanced.

Zusammmenfassung

Diese Arbeit setzt sich mit der internen Funktionsweise von PHP auseinander, eine Programmiersprache die zur Generierung bzw. Steuerung der Ausgabe eines Webservers eingesetzt wird. Um grundlegende PHP-interne Vorgänge und ihre Ursachen zu verstehen wird zuerst der Aufbau des Internets mit Schwerpunkt auf das Web nähergebracht. Mit diesem Wissen können die Rollen der Komponenten, aus denen PHP besteht, leichter verstanden werden.
Der Ausführungsfluss von PHP wird zeitgleich mit der Auslegung des PHP-Quelldepots untersucht und ein paar Schlüsselfunktionen und deren Rollen kennengelernt. Eine besondere Funktion zur Laufzeit spielt die Syntaxanalyse des PHP-Skriptums, und deshalb wird auch auf die Bedeutung der Grammatiken eingegangen. Da PHP sehr komplex ist und eine vollständige Untersuchung die Rahmen dieser Arbeit sprengen würde, werden Methoden zur selbstständigen Analyse des PHP präsentiert.
Schließlich wird anhand einer praktischen Erweiterung gezeigt, wie die Laufzeitumgebung von PHP weiterentwickelt werden kann.

Download it here.
Sorry, it's in German only. Aber du kannst gerne bei der Übersetzung helfen, sodass viele andere Programmierer rund um den Globus davon profitieren können :-)

No comments:

Post a Comment