COMMUNITY

Tool convert php to haxe

haxe-php
(6umpukc uHkBu3umop) #1

found this http://phptohaxe.haqteam.com/code.php

is there some cli version for local using without internet?

0 Likes

(Andy Li) #2

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

0 Likes

(Aleksandr Kuzmenko) #3

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

2 Likes

#4

…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

(Allan Dowdeswell) #5

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

1 Like

(Mike Robinson) #6

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.

0 Likes

(Valentin Lemière) #7

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.

0 Likes

(Kevin Leung) #8

Haxe compiles to PHP very well.

0 Likes

(Mike Robinson) #9

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.

0 Likes

(6umpukc uHkBu3umop) #10

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

(Aleksandr Kuzmenko) #11

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

2 Likes