PHP's Source Code For PHP Developers - Part 1 - The Structure
Note: This article was originally published at Planet PHP
on 19 June 2600.
As a PHP developer, I find myself referencing PHP's source code more and more in my normal everyday work. A It's been very useful in everything from understanding what's happening behind the scenes to figuring out weird edge-cases to see why something that should be working isn't. A And it's also very useful in the cases when the documentation is either missing, incomplete or wrong. A So, I've decided to share what I've learned in a series of posts designed to give PHP developers enough knowledge to actually read the C source code behind PHP. A No prior knowledge of C should be necessary (we'll cover some of the basics), but it will help.This is the first post of the series. A In this post, we'll walk through the basics of the PHP application: where to find it, the general structure of the codebase and a few reallyA fundamentalA concepts about the C language. A To be clear, the goal of the series is to get a readingA comprehensionA of the source code. A So that means that at some points in the series, some simplifications will be made to concepts to get the point across withoutA over-complicatingA things. A It won't make a significant difference for reading, but if you're trying to write for the core, there is more that will be needed. A I'll try to point out these simplifications when I make them... A
Additionally, this series is going to be based off the 5.4 codebase. A The concepts should be pretty much the same from version to version, but this way there's a defined version that we're working against (to make it easier to follow later, when new versions come out).
So let's kick it off, shall we?Read more A»


