COMMUNITY

What version of php 7 does Haxe generate?

haxe-php

(Luke) #1

In WAMP, there are two versions of PHP - 7.0.23 and 7.1.9. Now, I’m not sure if there is any difference in APIs or syntax structure, but I would like to confirm that if there is a significant difference, which version does Haxe’s PHP generator support? There is nothing in the manual so far that I can see which suggests which version Haxe supports.

Many thanks in advance for clarification.


(Jens Fischer) #2

At least according to the version compatibility table, anything >= 7 should be fine.


(Valentin Lemière) #3

According to the CI anything >= 7.0 is fine https://github.com/HaxeFoundation/haxe/blob/development/tests/runci/targets/Php.hx#L16

And it installs the 7.1.8 on windows, so 7.1 should be fine too.
Might as well takes this one for any improvements added since 7.0.


(Luke) #4

Based on this link, only Haxe 4.0+ preview builds supports 7.1.9 while Haxe 3.4 (the one I’m currently using) only supports 7.0.23, not 7.1? I’ll probably upgrade to Haxe 4.0 when it’s released, given it doesn’t break existing projects!

I will probably have two separate versions of Haxe to begin with before migrating any code for testing purposes.


(Jens Fischer) #5

You mean because it says “7.0” rather than “7.0+” for 3.4.0? Not sure if that really means much, I would just give it a try and see what happens. :slight_smile:


(Aleksandr Kuzmenko) #6

Haxe 3.4 can target PHP 5.3+ without and PHP7.0+ with -D php7 flag.
Haxe 4.0 can target only PHP 7.0+

  • 7.0+ means 7.1, 7.2, 7.3 as well.

(Jens Fischer) #7

Haxe 3.4 can target PHP 5.3+

So the version table is incorrect about 3.4.0 supporting 5.1?


(Aleksandr Kuzmenko) #8

Looks like it’s even 5.4+: https://github.com/HaxeFoundation/haxe/issues/4464