Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Foreword

Foreword

If you had told me when I submitted my first patch to the PHP project that I’d be writing a book on the topic just three years later, I’d have called you something unpleasant and placed you on /ignore. However, the culture surrounding PHP development is so welcoming, and so thoroughly entrapping, that looking back my only question is “Why aren’t there more extension developers?”

The short (easy) answer, of course, is that while PHP’s documentation of userspace syntax and functions is—in every way—second to none, the documentation of its internals is far from complete and consistently out of date. Even now, the march of progress towards full Unicode support in PHP6 is introducing dozens of new API calls and changing the way everyone from userspace scripters to core developers looks at strings and binary safety.

The response from those of us working on PHP who are most familiar with its quirks is usually, “Use the source.” To be fair, that’s a valid answer because nearly every method in the core, and the extensions (both bundled and PECL), are generously peppered with comments and formatted according to strict, well followed standards that are easy to read...once you’re used to it.

But where do new developers start? How do they find out what PHP_LONG_MACRO_NAME() does? And what, precisely, is the difference between a zval and a pval? (Hint: There isn’t one; they’re the same variable type). This book aims to bring the PHP internals a step closer to the level of accessibility that has made the userspace language so popular. By exposing the well planned and powerful APIs of PHP and the Zend Engine, we’ll all benefit from a richer pool of talented developers both from the commercial ranks and within the open source community.