# Extensions building tutorial

- Thread: https://externals.io/message/23654
- Original archive: https://news-web.php.net/php.internals/23654
- Started by Artzi on 2006-05-25T13:58:04+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #23654 — Artzi — 2006-05-25T13:58:04+00:00

URL: https://externals.io/message/23654#23654

I am looking for a good place to learn about the following:
1. Writing a customized extension
2. Compiling PHP with customized extensions, including how can I set up
a customized location their code and what I should add to the configure
line and such
 
Any good tutorials out there?
 
Thanks.

---

## #23655 — Marcus Boerger — 2006-05-25T13:59:34+00:00

URL: https://externals.io/message/23654#23655 · In reply to: #23654

Hello Yoav,

http://www.amazon.com/gp/product/067232704X
+
http://talks.somabo.de
+
some zend tutorials :-)

best regards
marcus

Thursday, May 25, 2006, 3:58:04 PM, you wrote:

> I am looking for a good place to learn about the following:
> 1. Writing a customized extension
> 2. Compiling PHP with customized extensions, including how can I set up
> a customized location their code and what I should add to the configure
> line and such
>  
> Any good tutorials out there?
>  
> Thanks.



Best regards,
 Marcus

---

## #23656 — Joseph Crawford — 2006-05-25T14:02:33+00:00

URL: https://externals.io/message/23654#23656 · In reply to: #23654

i would check out Sara Golemon's book Extending and Embedding PHP
it is not yet released but due out soon.  I have it pre-ordered.

It's supposed to be a good starting point for this stuff.

http://www.amazon.com/gp/product/067232704X/sr=8-1/qid=1148565631/ref=pd_bbs_1/002-6678673-7532040?%5Fencoding=UTF8

Thanks,

-- 
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
http://www.codebowl.com/
1-802-671-2021
codebowl@gmail.com

---

## #23659 — Michael B Allen — 2006-05-25T15:48:21+00:00

URL: https://externals.io/message/23654#23659 · In reply to: #23654

On Thu, 25 May 2006 16:58:04 +0300
"Artzi, Yoav (Yoav)" <artzi@avaya.com> wrote:

> I am looking for a good place to learn about the following:
> 1. Writing a customized extension
> 2. Compiling PHP with customized extensions, including how can I set up
> a customized location their code and what I should add to the configure
> line and such
>  
> Any good tutorials out there?

   http://www.zend.com/php/internals/extension-writing1.php

After that, download the php source and look at existing extensions in
the ext directory. For each macro or function you want to know about
try googling with the 'site:' directive. For example:

   site:http://www.zend.com/ RETURN_STRING

Mike

---

## #23660 — Steph Fox — 2006-05-25T16:03:12+00:00

URL: https://externals.io/message/23654#23660 · In reply to: #23659

> > […]
> 
>   http://www.zend.com/php/internals/extension-writing1.php

--- parts 2 and 3 are also useful :)

- Steph

---

## #23661 — Sara Golemon — 2006-05-25T16:07:21+00:00

URL: https://externals.io/message/23654#23661 · In reply to: #23659

> > […]
> 
>   http://www.zend.com/php/internals/extension-writing1.php
> 
> After that, download the php source and look at existing extensions in
> the ext directory. For each macro or function you want to know about
> try googling with the 'site:' directive. For example:
> 
>   site:http://www.zend.com/ RETURN_STRING
> 
Or better still:  http://lxr.php.net/

---

## #23666 — Hartmut Holzgraefe — 2006-05-25T18:57:42+00:00

URL: https://externals.io/message/23654#23666 · In reply to: #23654

Artzi, Yoav (Yoav) wrote:
> I am looking for a good place to learn about the following:
> 1. Writing a customized extension
> 2. Compiling PHP with customized extensions, including how can I set up
> a customized location their code and what I should add to the configure
> line and such
>  
> Any good tutorials out there?

and now for the usual shameless plug:

   CodeGen_PECL: Tool to generate PECL extensions from an XML description

     PEAR package:  http://pear.php.net/package/CodeGen_PECL/

     Documentation: http://php-baustelle.de/CodeGen_PECL/manual.html

     Examples:      http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/docs/examples/

</plug mode="shameless>


-- 
Hartmut Holzgraefe, Senior Support Engineer                            .
MySQL AB, www.mysql.com

Are you certified? http://www.mysql.com/training/certification

---

## #23754 — Thomas Moenicke — 2006-05-28T20:56:36+00:00

URL: https://externals.io/message/23654#23754 · In reply to: #23654

Hi Yoav,

four chapters with example about writing extensions and SAPIs, useful as an 
introduction:

http://www.amazon.com/gp/product/0672325616/

-- 
Thomas
