Re: curious about PEAR C extensions...
| From: | Jeffrey A . Stuart | Date: | Sat, 14 Apr 2001 07:02:41 +0000 |
| Subject: | Re: curious about PEAR C extensions... | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-222@lists.php.net to get a copy of this message | ||
Here's a crazy thought then! Why not make most of the current extensions a part of PEAR?
Since
they would be dynamically loaded, then we could mix and match which modules get loaded as we
want. This could come in handy for hosting companies. Yes, I know that I can choose which
modules to be included in PHP at compile time BUT...if I choose most of them, it'll increase
the
size of PHP dramatically!!! Rather, I'd like to have a core set of modules in PHP and then be
able to choose which extra modules I load as I need to. For example, if one virtual site uses
postgress, it doesn't need the mysql extensions in PHP. So why waste the memory?
In article <m3u24gnk9o.fsf@kirin.trondheim.fast.no>, ssb@fast.no says...
> ["Eduardo Dominguez" <lalo_dominguez@yahoo.com>]
> > I am VERY curious about this whole PEAR C extensions.
> >
> > How do they differ from the extensions that come with PHP
> > (like sablotron, bcmath, etc) ?
>
> Apart from being dynamically loaded into PHP, they are no different
> from the bundled extensions.
>
> > How is it possible to derive a PHP class from a class
> > written in C ?
>
> Like you would use any other class. There's a prototype of the PEAR
> base class written in C, see
> http://cvs.php.net/viewcvs.cgi/pear/PEAR/INSTALL for how to
> install
> it. To use it instead of the PHP version, put the pear/PEAR directory
> before the lib/php directory in your include path. Then you can use
> the C-defined PEAR and PEAR_Error classes just like the old ones.
>
> > What else is possible with this ?
> >
> > I have a big site that would really welcome a rewrite in C
> > of some parts and this would help a lot.
>
> You can of course everything you can do in PHP and more, if you want
> to spend the extra coding and debugging time. There are some powerful
> features that are available in PHP's C API that you don't have access
> to from the script level, such as creating resources and object
> overloading.
>
> - Stig
>
> --
> Stig Sæther Bakken <ssb@fast.no>
> Fast Search & Transfer ASA, Trondheim, Norway
>
>
--
Jeff Stuart
jstuart@neo.rr.com