Re: PHP Extensions: C or C++?

From: Date: Mon, 06 Aug 2001 05:48:18 +0000
Subject: Re: PHP Extensions: C or C++?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-62212@lists.php.net to get a copy of this message
On Wed, 25 Jul 2001, J Smith wrote: > > 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++? Using C++ in a PHP extension is pretty simple. I have developed a framework called Zpp for implementing PHP extensions and most notably PHP classes in C++ making it even simpler (at least for me :-) Zpp is part of a PHP extension called Universe that uses the C++ CORBA ORB named MICO to connect PHP to CORBA objects. (Universe is an improved version of my old PHP extension called Satellite.) I plan to release Universe this week, so keep an eye on php-dev... Regards, David Eriksson

« previous php.dev (#62212) next »