This article will cover the steps needed in order to check the PHP7 compatibility, a small troubleshooter.

This article will also contain a compatibility issue check on the latest Zend Framework 1 version.

What is PHP 7 Express?

PHP 7 Express is the newest feature added in Zend Studio (from version 13). This feature is very useful for checking if your pre-PHP7 code will work on a PHP7 server.

The project creation

If you already have the project backup and you are sure you can modify your project you can skip this step.

If you want to create a new project for testing instead of modifying the original project make sure the PHP Version is set to PHP 5.6 or the PHP Version you use in the project. Choosing the PHP 7 option will hide the PHP 7 Express feature because Zend Studio assumes a PHP 7 project doesn’t need compatibility checks, but if the project is using a different version of PHP compatibility issues might apper.

Long story short: Use the exact PHP version your project is using at the project creation.

The New Local PHP Project dialog in Zend Studio 13
The “New Local PHP Project” dialog in Zend Studio 13 and the PHP version selection

The ‘PHP Interpreter’ selection

If the PHP 7 Express feature is won’t show up the issue might be the PHP Interpreter selected.

To check and modify the PHP Interpreter:

  • right click the project
  • type “interpreter”
  • The PHP -> Interpreter option should show up
  • If you only need a specific interpreter for a specific project you can check “Enable Project specific settings” by checking this option you won’t affect the other projects in the current workspace
Zend Studio PHP Interpreter Dialog
Zend Studio PHP Interpreter Dialog

The PHP 7 Express feature should now show up.

Project preparation

As we created a local project named zend-framework-test we will add the latest Zend Framework 1 version in our project.

  • right click on the project
  • create a new folder named library
  • download the latest Zend Framework 1 version from here, make sure you choose the Full option, not the Full Package one
  • extract the archive and browse the library folder
  • copy the Zend folder in your project’s library folder
  • if the Drag and Drop didn’t work and you had to manually copy the folder in your project you can click the project folder in Zend Studio and just press F5 (Refresh)

Using PHP 7 Express – Testing Zend Framework 1

Now let’s see PHP 7 Express in action. Using PHP 7 Express is very easy:

  • right-click the project, not a folder or a file because the feature won’t show up
  • click “Run PHP 7 Express…
  • a confirmation prompt will be displayed

After the analysis was done, you should see the PHP 7 Express view (or tab) in the bottom pane in Zend Studio (this depends on the perspective).

The result should look like this:

Zend Framework 1 compatibility issues with PHP7
Zend Framework 1 compatibility issues with PHP7

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>