What are good resources to start learning the internals of PHP and the Zend Engine?
-
**One minute** breezethrough at http://www.phpbuilder.com/articles/application-architecture/optimization/php-and-zend-engine-internals.html – Pacerier Jul 28 '15 at 09:31
4 Answers
The PHP Manual has a (sadly mostly empty) chapter on PHP internals.
The main development mailing list is internals@lists.php.net. You can sign up via php.net and/or use Markmail to search the archives.
The git repository for PHP is located on git.php.net, but there is also a mirror on GitHub.
For browsing the source code you should use the lxr.php.net cross reference tool.
The PHP wiki has a list of various resources on PHP development (blog posts, books, slides, etc).
In particular there is an (older) book by Sara Golemon: Extending and Embedding PHP.
A more current and ongoing effort is http://www.phpinternalsbook.com
If you have questions, you should try the #php.pecl room on efnet.
Also see this presentation by Sebastian Bergmann about Compiler Internals:
And make sure to check Nikic's blog. He's got a number of posts on how to read the source:
In addition to that, you can check the PHP Credits for individual contributers:
A number of them run their own blogs which might contain more information.

- 312,688
- 75
- 539
- 559
-
aw i missed to see the link (http://www.php.net/manual/en/internals2.php) , i have browsed into php docs assuming that is Zend Engine, not php, php and Zend Engine(server) ? are different, am i right? – Adam Ramadhan Dec 08 '10 at 16:31
-
2@Adam The Zend Engine is the part that parses, compiles and executes PHP code. As opposed to the PHP core that is just a few basic things, like Request handling and File and Network I/O. On top of that you got the various extensions. – Gordon Dec 08 '10 at 16:36
-
-
@Adam didnt read it. Can't tell how much of that is still up-to-date today. – Gordon Dec 08 '10 at 16:45
-
thanks alot gordon especialy the http://www.php.net/credits.php i never thought about that haha,anyway lets wait for 1-2 days :). – Adam Ramadhan Dec 08 '10 at 16:54
-
I found this quite useful: http://www.php-internals.com/book/ (use google translator if you can't read it ;) – marcio Nov 05 '14 at 18:33
-
@Gordon, I've a feeling Zend doesn't want to publish much writings on PHP internals to prevent [yet more](http://askubuntu.com/a/653637/344328) soon-to-be competitors. – Pacerier Jul 28 '15 at 10:16
-
-
@Gordon i found this resources and i think it's pretty useful too, https://www.scribd.com/document/49306684/building-custom-php-extensions , https://www.kchodorow.com/blog/2011/08/11/php-extensions-made-eldrich-installing-php/ , https://derickrethans.nl/talks/extensions-phpnw11.pdf – hassan Apr 18 '17 at 12:16
Another lecture on "how does it work" theme:
PHP UK Conference 2012 playlist - PHP under the hood slides, by Johannes Schlüter

- 58,060
- 25
- 98
- 150
On http://docstore.mik.ua/orelly/weblinux2/php/ch14_01.htm you can also find some interesting internals about writing php extensions

- 81
- 5