# What version of php 7 does Haxe generate?

**URL:** https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570
**Category:** Haxe
**Tags:** haxe-php
**Created:** [March 2, 2019, 4:16pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570 "2019-03-02T16:16:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tienery](https://community.haxe.org/user_avatar/community.haxe.org/tienery/32/964_2.png) [@tienery](https://community.haxe.org/u/tienery)
#### Post date: [March 2, 2019, 4:16pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/1 "2019-03-02T16:16:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [March 2, 2019, 4:20pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/2 "2019-03-02T16:20:30Z")

</div>

At least according to the [version compatibility table](https://github.com/HaxeFoundation/haxe#version-compatibility), anything \>= 7 should be fine.

---

<div class="post-metadata">

### Author: ![ibilon](https://community.haxe.org/user_avatar/community.haxe.org/ibilon/32/13_2.png) [@ibilon](https://community.haxe.org/u/ibilon)
#### Post date: [March 2, 2019, 4:28pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/3 "2019-03-02T16:28:15Z")

</div>

According to the CI anything \>= 7.0 is fine [haxe/Php.hx at development · HaxeFoundation/haxe · GitHub](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.

---

<div class="post-metadata">

### Author: ![tienery](https://community.haxe.org/user_avatar/community.haxe.org/tienery/32/964_2.png) [@tienery](https://community.haxe.org/u/tienery)
#### Post date: [March 2, 2019, 4:35pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/4 "2019-03-02T16:35:02Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [March 2, 2019, 4:47pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/5 "2019-03-02T16:47:43Z")

</div>

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. 🙂

---

<div class="post-metadata">

### Author: ![RealyUniqueName](https://community.haxe.org/user_avatar/community.haxe.org/realyuniquename/32/10_2.png) [@RealyUniqueName](https://community.haxe.org/u/RealyUniqueName)
#### Post date: [March 3, 2019, 12:28pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/6 "2019-03-03T12:28:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [March 3, 2019, 1:03pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/7 "2019-03-03T13:03:56Z")

</div>

> Haxe 3.4 can target PHP 5.3+

So the version table is incorrect about 3.4.0 supporting 5.1?

---

<div class="post-metadata">

### Author: ![RealyUniqueName](https://community.haxe.org/user_avatar/community.haxe.org/realyuniquename/32/10_2.png) [@RealyUniqueName](https://community.haxe.org/u/RealyUniqueName)
#### Post date: [March 3, 2019, 2:45pm UTC](https://community.haxe.org/t/what-version-of-php-7-does-haxe-generate/1570/8 "2019-03-03T14:45:29Z")

</div>

Looks like it’s even 5.4+: [PHP : array access to a function output is a bad PHP syntax · Issue #4464 · HaxeFoundation/haxe · GitHub](https://github.com/HaxeFoundation/haxe/issues/4464)
