dreftymac
dreftymac

Reputation: 32370

convert any language into PHP sourcecode

Update:

This question is a duplicate of Are there any programming languages targeting PHP, besides Haxe?

The answers given here appear to be disjoint from those given at the other node, so this question was not (yet) deleted. If possible, please merge the answers here into the other node.

Question:

Is there any such thing as a programming language (other than an esoteric language such as BrainF@#$, or the languages PHP or VB) that you can "compile" into non-obfuscated PHP source code?

Rationale:

Swip wants to generate ordinary PHP code because it is so ubiquitous for the types of projects swip wants to do. Unfortunately swip would like to actually avoid writing PHP -- strange but true! Swip is crazy enough to want to generate PHP source code without having to type any PHP into Swip's editor.

Upvotes: 2

Views: 555

Answers (3)

stepmoz
stepmoz

Reputation: 118

Take a look at

http://github.com/juliend2/phlower

This project claims about itself:

phlower (pronounced flower) is a small ruby script that compiles the Awesome code (invented by MACournoyer for his book void://createyourproglang.com/ ) into PHP code. This script is written in Ruby and it depends on the racc gem.

Upvotes: 3

Byron Whitlock
Byron Whitlock

Reputation: 53851

I don't know what swip is, but this is not really possible. There are tools to aid the programmer in doing this, but they will not run without deep human interaction and refactoring. What you want is a skilled programmer.

Edit I think I misunderstood, you want a scripting language to script PHP? While php compiles to bytecode internally, it isn't like java or .net where you can use different languages to do it. What are you trying to accomplish?

Upvotes: 0

amarillion
amarillion

Reputation: 24917

Wasabi compiles down to PHP, but you'll have to beg Joel Spolsky for a copy.

Upvotes: 0

Related Questions