views:

431

answers:

4

PHP doesn't get much love but is still a winner at easy deployment (for cheap hosting).

Are there any programming languages (besides haXe) that target PHP? Writing applications in this language and then translating it into PHP, like some languages target C as an intermediate language?

  • The Scheme implementation Chicken compiles into C.
  • XOTcl converts Java code into Tcl code
  • LINJ was(?) a tool to convert Lisp into nice looking Java code

+ a lot of ways to produce JavaScript without touching JavaScript.

+3  A: 

Kira http://www.mathgladiator.com/projects/kira/

EDIT: Project stopped. New versions now don't target PHP anymore. New project is a web framework for C#.

Bill
Thanks for referencing my project.
MathGladiator
A: 

Why?

php up to v 3.0 was pretty much a utility to hack html, version 4.0 was a very decent alternative to Perl or any other scripting language. Version 5.0 and up is a fully flegged OO language capable of solving many problems elegantly and efficiently.

The ' array() ' construct which behaves like an an array when you use integer subscripts and a hash when you use string subscripts is by far the most elegant and easy to use collection handling mechanism I have seen in any language. Arrays of Hashes, hashes of arrays, arrays of objects, nested tree structures are all acheived by straightforward coding with no special apis or declarations.

With the "batch" interface in v5.0 I predict that php is about to break out of the web/html ghetto and into more general use.

James Anderson
+2  A: 

PIL - Platform Independent Language

tylermac
+5  A: 

Pharen, a Lisp variant.

stesch