Re: Extending PHP

From: Date: Thu, 04 Jan 2001 23:32:03 +0000
Subject: Re: Extending PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32770@lists.php.net to get a copy of this message
on 1/4/01 3:40 PM, Richard Lynch at richard@zend.com wrote: > PEAR -- PHP Extensible something or other. It's got its own mailing list. > You can find some basic "HowTo" samples in Rasmus' talks at computer geek > conferences, often posted online at http://conf.php.net > > You still need to grok C and the macros, but it's easier to alter without > recompiling all of PHP. Thanks! I will look in to it. When I built PHP, I excluded PEAR support because it was giving me troubles...looks like I'll have to dive back in to that... c won't be a problem at all...I already have that figured out :) It's PHP I'm working on now... >> What about pros and cons to different methods? I think the simplest and > most >> friendly solution is writing classes in PHP, but I may run in to annoying >> limitations. Otherwise, I would most like to implement a PHP class in c, > but >> I can't find documentation on this. Is it as simple as naming your > functions >> <classname>::<method name> and referencing a local variable 'this' >> are is >> there more to it? > > Huh? PHP classes are implemented in C. If you want to write a whole new > class system... Wow. Maybe I didn't come through clearly. I'd like a class that can be instantiated like this: $obj = new MyClass; But where MyClass is implemented in c rather than in PHP code. >> Also, does any one know if there are plans to add destructor support to > PHP >> classes? It's a pretty glaring omission in my opinion... > > It's on the list, but it's probably something pretty tricky or it would > already have been done -- Keep in mind that PHP's memory management is > *NOTHING* like C's or C++'s... Perhaps you could dive into the PHP code and > try to do it :-) Hmmm...I thought you might say something like that... Thanks for your reply! Geoff

« previous php.general (#32770) next »