# PHP 7 and Zend Framework 1.12

**URL:** <https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327>\
**Category:** Contributors\
**Tags:** zend-mvc\
**Created:** [October 19, 2017, 8:39am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327 "2017-10-19T08:39:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 8:39am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/1 "2017-10-19T08:39:36Z")

</div>

Hi

we work in the possibility to run Zend 1.12 application in PHP 7. actually we use php 5.6.

my question : is there any possible issues of using PHP 7 with Zend 1.12 application.

Sincerly

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [October 19, 2017, 9:38am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/2 "2017-10-19T09:38:28Z")

</div>

> is there any possible issues of using PHP 7 with Zend 1.12 application.

Two main problems:

- ZF1 doesn’t support PHP7, that’s mean: the entire code was never tested against PHP7
- ZF1 itself is no longer supported

Please see also: [Zend Framework 1 End-of-Life Announcement](https://framework.zend.com/blog/2016-06-28-zf1-eol.html)

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 11:52am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/3 "2017-10-19T11:52:30Z")

</div>

> [@froschdesign](#):
>
> ZF1 itself is no longer supported

first Thanks for your answer.

one more thing : if i run an existing zf1 using php7 i could have issues?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)\
**Post date:** [October 19, 2017, 12:03pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/4 "2017-10-19T12:03:33Z")

</div>

Yes, you could face issues, so make sure you have an extensive test suite  
for your application before trying.

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 12:10pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/5 "2017-10-19T12:10:17Z")

</div>

First of all thanks for your answer,

After i install sample zf1 application and run it in PHP7 everything work as expected.

i have question is there an unit testing for zend framework library. my purpose is take zf1 library unitTesting and run it using php7

Sincerly

---

<div class="post-metadata">

**Author:** ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)\
**Post date:** [October 19, 2017, 12:44pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/6 "2017-10-19T12:44:38Z")

</div>

Yes, see [https://github.com/zendframework/zf1/blob/master/.travis.yml](https://github.com/zendframework/zf1/blob/master/.travis.yml) on  
how to run them

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [October 19, 2017, 12:49pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/7 "2017-10-19T12:49:24Z")

</div>

> [@bo.abdelilah](#):
>
> my purpose is take zf1 library unitTesting and run it using php7

Look also at the [issue tracker](https://github.com/zendframework/zf1/issues) and [pull requests](https://github.com/zendframework/zf1/pulls) for problems with PHP7. `Zend_Session` should has some problems and also other components.

But why do want to change the PHP version? I see no reason for this. My suggestion: invest your time and energy to migrate your application.

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 1:33pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/8 "2017-10-19T13:33:13Z")

</div>

Thanks a lot for your help.  
the idea is that we have application provide web service to other applications. and we need to focus on migration of the applications and keep the current web service application.

my question was about the web service application.

Thanks a lot .

---

<div class="post-metadata">

**Author:** ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)\
**Post date:** [October 19, 2017, 1:39pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/9 "2017-10-19T13:39:01Z")

</div>

> [@froschdesign](#):
>
> ZF1 doesn’t support PHP7, that’s mean: the entire code was never tested against PHP7

Actually, the last few 1.12 versions _were_ tested against PHP 7.0, but not 7.1.

Zend Server customers get patches for 1.12 still, and we’ve provided some with 7.1 support this year. Those are not in the public repository, however, as they were commissioned after the EOL, and as part of Zend Server SLAs. My point being: if you need more breathing room, that’s another option.

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 1:45pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/10 "2017-10-19T13:45:13Z")

</div>

Very useful informations.  
can your provide me link where i can find that zf1.12 was tested using php 7.0? so i can use it as officiel source of information

thanks a lot you help a lot.

---

<div class="post-metadata">

**Author:** ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)\
**Post date:** [October 19, 2017, 1:54pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/11 "2017-10-19T13:54:36Z")

</div>

PHP 7 support was added here: [https://github.com/zendframework/zf1/pull/518](https://github.com/zendframework/zf1/pull/518)

Those changes were released with version 1.12.10 on 24 Jan 2015.

A number of other patches were merged after that to address additional issues found by users running PHP 7, but that’s the primary one.

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [October 19, 2017, 1:56pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/12 "2017-10-19T13:56:07Z")

</div>

> [@matthew](#):
>
> Actually, the last few 1.12 versions were tested against PHP 7.0, but not 7.1.

Do not forgot:

```
matrix:
  allow_failures:
    - php: 7
    - php: hhvm

```

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 1:59pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/13 "2017-10-19T13:59:06Z")

</div>

OK,

we use php7.0 actually.

thanks you so much. now i can use your link tp proove that zf1.12 is compatible with php 7 and we can put the target application.

thanks a lot for your help and your support

---

<div class="post-metadata">

**Author:** ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)\
**Post date:** [October 19, 2017, 1:59pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/14 "2017-10-19T13:59:16Z")

</div>

Yes, but the last release build passes PHP 7: [https://travis-ci.org/zendframework/zf1/builds/144486314](https://travis-ci.org/zendframework/zf1/builds/144486314)

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [October 19, 2017, 2:00pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/15 "2017-10-19T14:00:40Z")

</div>

Open issues for PHP7: [https://github.com/zendframework/zf1/issues?q=is%3Aopen+is%3Aissue+label%3Aphp7](https://github.com/zendframework/zf1/issues?q=is%3Aopen+is%3Aissue+label%3Aphp7)

---

<div class="post-metadata">

**Author:** ![bo.abdelilah](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@bo.abdelilah](https://discourse.laminas.dev/u/bo.abdelilah)\
**Post date:** [October 19, 2017, 2:01pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/16 "2017-10-19T14:01:54Z")

</div>

OK Sir.

you save my day. i have the honor to learn from you.

Thanks

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [October 19, 2017, 2:10pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/17 "2017-10-19T14:10:39Z")

</div>

> [@matthew](#):
>
> Yes, but the last release build passes PHP 7…

I see a problem here: we have been communicating for some time that PHP7 is not **official** supported and this is what `allow_failures` says. Is this wrong now?

---

<div class="post-metadata">

**Author:** ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)\
**Post date:** [November 7, 2017, 7:06pm UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/18 "2017-11-07T19:06:36Z")

</div>

My main point is that while `allow_failures` was set, the tests _were passing_, which indicates strong confidence that the code will run under that platform. There may be edge cases, certainly, but the only ones I’ve had directly reported that needed fixing under the Zend Server SLAs were due to PHP 7.1 so far.

---

<div class="post-metadata">

**Author:** ![Crash](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/crash/32/387_2.png) [@Crash](https://discourse.laminas.dev/u/Crash)\
**Post date:** [September 14, 2018, 9:45am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/19 "2018-09-14T09:45:59Z")

</div>

Btw, Magento seems to still maintain Zf1 after it went EOL: [https://github.com/magento/zf1](https://github.com/magento/zf1)

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [September 14, 2018, 9:55am UTC](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327/20 "2018-09-14T09:55:21Z")

</div>

> [@Crash](#):
>
> Magento seems to still maintain Zf1

I don’t think so, otherwise they would allow new issue reports.

[Next page](https://discourse.laminas.dev/t/php-7-and-zend-framework-1-12/327.md?page=2&tag=makemoney0821-20)
