On Tue, Aug 30, 2011 at 13:19, Larry Garfield <la...@garfieldtech.com> wrote: > Hi folks. I'm not looking to write new PHP extensions per se, but am > looking to better grok the guts of PHP itself. (That's a first step on the > way to writing new extensions, though. Gateway drug!) I'm especially > interested in the memory/performance implications of various techniques. > > Are there any good books on the subject that would be of help? I'm familiar > with Sara Goleman's book, which has generally good reviews, but it's > several years old now and I'm not sure if there's anything newer that covers > PHP developments since the 5.0 days. > > Any suggestions?
Actually, Sara's book should still be the most relevant on the subject (at least of books in print). There's another by an author named Blake Schwendiman, named "Building Custom PHP Extensions" from 2003, which may be of some help, but that would be more PHP4-centric, or previewing PHP5 RC's at best --- which wouldn't be reliable in and of itself. That said, as an additional resource on the subject, it may be of some use. I haven't read it myself, and just found it searching on Amazon now. All of that aside, obviously your best bet, knowing you, would be trial-and-error. I've written a few dozen extensions myself over the years, and each and every time I've found out new and better ways of doing things. I'd start by writing extensions to optimize things you use on a regular basis for clients or internally (such as redundant database queries or encryption algorithms). As for getting started, Zend has a decent introduction on the subject if you haven't yet seen it. It won't get as deep into the guts as you'd probably like, but I'm not certain that there is anything on ink and paper. For that, your best bet would likely be the "Hacker's Guide" on php.net. ^1: http://www.amazon.com/Building-Custom-Extensions-Blake-Schwendiman/dp/1411601882/ref=sr_1_2?ie=UTF8&qid=1314725705&sr=8-2 ^2: http://devzone.zend.com/article/1021 ^3: http://php.net/internals -- </Daniel P. Brown> Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php