Extending PHP
| From: | Geoff Coffey | Date: | Thu, 04 Jan 2001 17:36:52 +0000 |
| Subject: | Extending PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32668@lists.php.net to get a copy of this message | ||
I have a need to add some functionality to PHP and I'm looking for
approaches. I am aware of these possibilities:
Implement PHP callable functions in c (there is some documentation for this
with PHP 3 in the manual)
Implement functions/classes in PHP and include the script file
Implement PHP callable functions in Java (I don't think you really need
documentation for this...)
Are there any other possibilities? Is there any way to dynamically extend
PHP (rather than forcing a rebuild to get the new functions included...)? Is
there any documentation for extending PHP 4?
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?
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...
Thanks,
Geoff