Are there any languages that use PHP as a virtual machine?
I am wondering if there are any languages that extend PHP into something ahem "better"?
They don't have to necessarily be able to interact 开发者_StackOverflowwith PHP, but it is certainly a benefit if they can (e.g. call PHP functions or even be called from PHP).
One example:
The LOL Code PHP Parser: http://www.tetraboy.com/lolcode/
There's Facebook Hip Hop. It takes PHP, compiles it down to C++, and then compiles that into a big fat binary with a webserver included. Then you just deploy that. It ends up being a big file - weighing in at 1 GB - but it reduces server load by upwards of 50%.
We have some discussion on php|architect - http://www.phparch.com/?s=hiphop
There is Haxe, that compiles into PHP (among other things): Haxe.org
Here's an article from CodingHorror about Wasabi, a language which apparently compiles down to PHP among other strange things:
http://www.codinghorror.com/blog/2006/09/has-joel-spolsky-jumped-the-shark.html
If you mean extending PHP's capabilities, I assume the plentiful modules that exist for it already do that...
FogBugz is written in a custom in-house extension of VBScript that they can compile to either VBScript or PHP (for Windows and Unix servers, respectively). Their compiler is written in C#.
http://www.joelonsoftware.com/items/2006/09/01b.html is a good read.
精彩评论