Re: Possible to load any dll's / shared objects with PHP?
| From: | Stefan Neufeind | Date: | Sun, 11 Jan 2004 11:56:30 +0000 |
| Subject: | Re: Possible to load any dll's / shared objects with PHP? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24977@lists.php.net to get a copy of this message | ||
Public answer to Bertrand:
I know it's not yet possible with php. But maybe someone here knew a
solution - be it a pear/pecl-extension in-the-works or something ...
or has already thought about writing such an extension.
Pierre's answer what I was thinking of.
Thanks for the quick reply
Stefan
On 11 Jan 2004 at 12:49, Pierre-Alain Joye wrote:
> On Sun, 11 Jan 2004 12:13:39 +0100
> "Stefan Neufeind" <stefan@neufeind.net> wrote:
>
> > Sorry if this has been asked before but:
> > I thought about using dll's (Windows) and shared-objects (Linux) in
> > PHP-programs. Is there a way to: a) load such a library and b) get
> > function-pointers to be able to call functions stored in those libs?
> >
> > Looking at the docs I found "dl" which seems to be restricted to
> > php- extensions. For windows the w32api-functions
> > (http://de2.php.net/manual/en/ref.w32api.php) seem a solution -
> > although I hoped there was a similar interface for Linux / Windows
> > so you just had to exchange the name of the library but leave all
> > function-names etc. unchanged ...
>
> Wez is working on ffi (aka ext/dangerous). ffi is exactly
> what you need and is multiplatform.
>
> Find it pecl/ffi