Documentation for creating PECL extension

php.internals

Joseph Crawford

20 years ago
Hello Everyone, I have some knowledge of C and would like to learn more, i have a great book by Deitel & Deitel and have gone through it. What i would like to know is where i can get docs on creating PHP extensions so that i could use them with my PHP on windows and nix. Any direction is appreciated.
-- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com

Sara Golemon

20 years ago
> I have some knowledge of C and would like to > learn more, i have a great book by Deitel & Deitel > and have gone through it. What i would like to know is > where i can get docs on creating PHP extensions so > that i could use them with my PHP on windows and nix. >
http://www.zend.com/php/internals/ should be enough to get you started. George Schlossnagle's "Advanced PHP Programming" has a chapter or two in the back on extension development, and I should have "Extending and Embedding PHP" out early next year. Beyond that, just ask questions (preferrably on the pecl-dev@lists.php.net list -- internals@ is supposed to be focused on the core) and hopefully someone will be able to offer insight. -Sara

Bob Silva

20 years ago
I started out by copying ext/skel and went from there. Using some real simple extensions as examples helps as well, SPL was really helpful since my extension is all object based, and I didn't need to interface with an external library, in that case, mysqli is a real clean example. Read Sara's articles on zend.com to understand the zval structure and parameter parsing api, once you have these down the rest flows pretty well even without a background in C. Hope this helps, Bob Silva

Andi Gutmans

20 years ago
You can also check out my book: http://tinyurl.com/7aect It's a free download. It has one chapter of the basics for PHP extension writing. It might not answer all your questions but definitely gives a solid foundation for understanding how things work. Andi At 03:36 PM 12/8/2005, Joseph Crawford wrote:

Joseph Crawford

20 years ago
lol so now i find out it's a free download i bought that book not long ago i like print better anyway ;)
-- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com

Jani Taskinen

20 years ago
1 (one) email about this would have been enough. No more spam please! :) --Jani On Thu, 8 Dec 2005, Andi Gutmans wrote:

Joseph Crawford

20 years ago
jani, what are you talking about?
-- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl@gmail.com