www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - PHP embed

reply Gerdus van Zyl <gvz infireal.com> writes:
Has anybody tried to embed PHP in a D application?
I'm want to do a XUL runner application that uses PHP as a scripting 
language. According to me D is the perfect companion to PHP for heavy 
duty work.
Apr 07 2005
next sibling parent "Charlie" <charles jwavro.com> writes:
 . According to me D is the perfect companion to PHP for heavy
 duty work.

I agree :) ( Im actually writing a php-for-d-lib that will have alot of the core php funcs ). Haven't tried to extend PHP using D yet, someone did get this working but ive lost the link :S, you tried searching the forum ? Charlie! "Gerdus van Zyl" <gvz infireal.com> wrote in message news:d33gb6$2a52$1 digitaldaemon.com...
 Has anybody tried to embed PHP in a D application?
 I'm want to do a XUL runner application that uses PHP as a scripting
 language. According to me D is the perfect companion to PHP for heavy
 duty work.

Apr 07 2005
prev sibling parent reply "Andrew Fedoniouk" <news terrainformatica.com> writes:
Just curious.... what is wrong with ECMAScript (JavaScript)?
What is in PHP better in principle than in JS?

( There is an implentation of JS in D according to DigitalMars site)

Andrew. 
Apr 07 2005
next sibling parent reply Gerdus van Zyl <gvz infireal.com> writes:
Andrew Fedoniouk wrote:
 Just curious.... what is wrong with ECMAScript (JavaScript)?
 What is in PHP better in principle than in JS?
 
 ( There is an implentation of JS in D according to DigitalMars site)
 
 Andrew. 
 
 

Nothing wrong with JavaScript, i use it every day. PHP has a huge amount of libraries,code that you can use. Plus alot of developers. Object orientated code is also more traditional than PHP. Besides not many apps use PHP as scripting language (even thought its possible), so its a interesting thing to do : - ) ECMA/JavaScript does however have a few things i like more than in PHP, so if implementing PHP turns to be too difficult i'll use it.
Apr 07 2005
parent "Andrew Fedoniouk" <news terrainformatica.com> writes:
"Besides not many apps use PHP as scripting language (even thought its
possible)"

Problem with embedding PHP is simple:
it did not have GC. Starting from version 4.0 it
got reference counting system though.

This works if you have short living scripts, e.g.
web page execution cycle:
create VM and memory sandbox -> run script
-> destroy VM and memeory sandbox .

But in other types of applications you should be extremely
careful using it. Problem of cyclic references is the one
COM is dying from.

Andrew.


"Gerdus van Zyl" <gvz infireal.com> wrote in message 
news:d34ejs$t1a$1 digitaldaemon.com...
 Andrew Fedoniouk wrote:
 Just curious.... what is wrong with ECMAScript (JavaScript)?
 What is in PHP better in principle than in JS?

 ( There is an implentation of JS in D according to DigitalMars site)

 Andrew.

Nothing wrong with JavaScript, i use it every day. PHP has a huge amount of libraries,code that you can use. Plus alot of developers. Object orientated code is also more traditional than PHP. Besides not many apps use PHP as scripting language (even thought its possible), so its a interesting thing to do : - ) ECMA/JavaScript does however have a few things i like more than in PHP, so if implementing PHP turns to be too difficult i'll use it.

Apr 07 2005
prev sibling parent reply Dejan Lekic <leka entropy.tmok.com> writes:
Andrew, I actually couldn't think of better language for this job than
ECMAScript. Mozilla produces an excellent, easily embeddable ECMAScript
implementation in pure C , so it would be very easy to use it in D
applications IMHO.

-- 
...........
Dejan Lekic
  http://dejan.lekic.org
  
Apr 08 2005
parent Chris Sauls <ibisbasenji gmail.com> writes:
Or you could just use DMDScript 1.05:
http://www.digitalmars.com/dscript/

-- Chris Sauls

Dejan Lekic wrote:
 Andrew, I actually couldn't think of better language for this job than
 ECMAScript. Mozilla produces an excellent, easily embeddable ECMAScript
 implementation in pure C , so it would be very easy to use it in D
 applications IMHO.
 

Apr 09 2005