[nycphp-talk] Adding to PHP API

Hans Zaunere hans at
Mon Apr 14 17:01:50 EDT 2003

Hey Jim,

--- Jim Musil <jmusil at> wrote:
> What's involved with writing some of my functions in C and plugging them
> into the PHP API?

Well obviously this is writing extensions (PECL) and you can generally get a
good start with phpinstallpath/bin/phpize and:

> Once they are plugged-in do I have to recompile PHP?

Negative.  You generally compile them as shared objects, then can dl() them.

> Do I have to restart Apache every time I make a change?

Negative (AFAIK).

> What kind of speed bonus can I expect?

Depending on tasks, considerable.  For instance, heavy text parsing or
manipulation can probably get you big boosts.

> Links? Stories? Wisdom?

Ahh, the hardest part.  Finding a nice HOWTO on the subject is impossible
AFAIK (if you find anything, please post it) and I've had the best luck with
the links above, some articles strewn around the net, and probably the best
is looking at other modules (dbg is nice).

Of course, some on this list write extensions day in and day out (look at the
ADT extension).

Hans Zaunere
President, New York PHP
hans at

More information about the talk mailing list