PHP embedded in D.

Anders Bergh anders1 at gmail.com
Tue Jul 3 18:50:54 PDT 2007


On 7/4/07, Joshua <savagejoshua at gmail.com> wrote:
> Hate to sound so newbish but is there a tutorial on how to do that? I think I understand what you are saying but I have not tried it with anything like PHP before.
>
> Anders Bergh Wrote:
>
> > On 7/4/07, Joshua <savagejoshua at gmail.com> wrote:
> > > Greetings All,
> > >
> > > Well I am now learning D and as part of the process I am making a GA in D for a game I am working on. Since the games scripting is in PHP and Ruby I need a way to run these scripts in D. Has anyone tried using something like PHP-embed in D?
> > >
> > > I can use the PHP CLI if I really must but I would prefer just using the some sort of PHP api directly.
> > >
> > > Thanks.
> > >
> >
> > You can convert the PHP headers to D modules manually or using a tool
> > such as htod or bcd.gen, and use the PHP API directly in D.
> >
> > --
> > Anders
>
>

http://www.digitalmars.com/d/1.0/htomodule.html

This page explains it all. Basically, D supports the C ABI so it can
use existing C libraries, however it does not support C headers. You
need to translate those into D modules.

-- 
Anders



More information about the Digitalmars-d mailing list