PHP Extensions: C or C++?
| From: | J Smith | Date: | Wed, 25 Jul 2001 20:55:22 +0000 |
| Subject: | PHP Extensions: C or C++? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-60999@lists.php.net to get a copy of this message | ||
I have a few PHP extensions that I'd be willing to share but I've never
done this sort of thing before. I wrote a few extensions for work, and my
company sees no problem in donating them to the open source world and to
the PHP project, but I'm curious about something:
Are extensions for PHP required to be coded in C, or will C++ do? I'm a C++
guy myself, and since PHP is largely written in C, does this cause a huge
problem? If there's enough interest in any of my extensions, I'd consider a
re-write from C++ to C, but I don't want to do that if I don't have to.
The only extension really ready for prime-time right now is a rather simple
Porter stemmer, written in ANSI/ISO C++ using things like the standard C++
string library and such. It's a simple extension that we're using to make
the search engine we're building a bit easier to manage. Any future
extensions are going to be focused on making search engines easier to
implement in PHP. (We're building a search engine that uses PHP.)
Any interest in that sort of thing? And if so, C or C++?
J