31

What are good resources to start learning the internals of PHP and the Zend Engine?

NikiC
  • 100,734
  • 37
  • 191
  • 225
Adam Ramadhan
  • 22,712
  • 28
  • 84
  • 124
  • **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 Answers4

41

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.

Gordon
  • 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
  • btw the book is at 2006 is it ok ? – Adam Ramadhan Dec 08 '10 at 16:43
  • @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
  • @Pacerier your feelings are yours. – Gordon Jul 28 '15 at 10:37
  • @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
7

Another lecture on "how does it work" theme:

PHP UK Conference 2012 playlist - PHP under the hood slides, by Johannes Schlüter

tereško
  • 58,060
  • 25
  • 98
  • 150
2

On http://docstore.mik.ua/orelly/weblinux2/php/ch14_01.htm you can also find some interesting internals about writing php extensions

sassman
  • 81
  • 5
1

From Dutch PHP Conference (2009):

PHP Compiler Internals (mp3)

with slides:

http://www.scribd.com/doc/18171982/PHP-Compiler-Internals

Shog9
  • 156,901
  • 35
  • 231
  • 235
trix
  • 1,110
  • 7
  • 9