Tool convert php to haxe

found this Code - PhpToHaxe (php to haXe convert tool)

is there some cli version for local using without internet?

Try contact the author? There is an email address under haqteam.com.

I don’t think so.
But here are the sources: https://bitbucket.org/yar3333/phptohaxe

2 Likes

…which can then be used to turn it into Haxe!
…which can then be used to turn it into php…
…which can then be used to turn it into Haxe!
…

1 Like

You’re one of those people who makes funny sentences with Google Translate, aren’t you? :smile:

1 Like

Like it or not, PHP and Haxe are radically different languages – built at different times and for different worlds. Asking for an automatic tool to convert between one and the other is, to me, like asking for a tool that will convert an apple into a watermelon. Yes, both of them might be “edible things,” but they truly bear no exploitable resemblance to one another.

The haxe compiler is a tool which does automatic conversion between haxe and php :wink:
And doing a php compiler which outputs to haxe might be possible as well.

1 Like

Haxe compiles to PHP very well.

Yes, it compiles to PHP quite nicely, although deficiencies of the PHP language’s design leave a lot of things to be desired.

However, that’s not what we’re talking about here. You can’t take PHP code and meaningfully convert it into Haxe code. Certainly you will not wind up with something that gains particular advantage by being “Haxe” source-code.

Sure, the PHP language is inching forward, as it always does, in various ways (that are usually incompatible with prior versions of itself), but I just finished an enormous conversion-and-rehab project in which none of the source-code started out as PHP-7 and some of it was in (dear God) versions of the language. “It wasn’t pretty.” 5,993 files’ worth of stuff that was not pretty.

. . . (but, by gawd, it works) . . . :exploding_head: . . . does four+ million dollars every month, and it . . . works.

Asking for an automatic tool to convert between one and the other is, to me, like asking for a tool that will convert an apple into a watermelon

no it’s just class syntax converter
so it not so complicate

i’m in the middle of some writing this tool
of course i use perl language for this

bx haxe src/tutorials/examples/Main.php

github.com / 6umpukc-uHKBu3umop/6umpukc/tree/master/example-haxe

1 Like

Did you convert to Haxe? Any chance for a detailed (blog) post?

3 Likes