Zend Server 2018 Brings PHP 7.2 To IBM i
September 10, 2018 Alan Seiden
Since its release on IBM i in 2006, PHP, a popular open source language for building web sites, has become well established on this platform. Like IBM i, PHP has kept up with the times, improving with each release. PHP is installed via a product called Zend Server, which offers a basic, free license for IBM i users, as well as premium paid licenses.
I wanted to learn more about the latest release, called Zend Server 2018 (pronounced twenty eighteen), so I interviewed Zeev Suraski, co-founder and chief technology officer of Zend, which is now part of Rogue Wave, and Mickey Hoter, senior product manager at the parent company.
Zend Server 2018 includes version 7.2 of PHP. The most notable enhancement for IBM i users is a small but potentially helpful performance improvement. While not as dramatic as the performance boost of PHP 7.0, version 7.2 does provide a speed improvement compared to PHP 7.0 and 7.1. For one tester’s benchmarks (on Linux, not IBM i), see this link.
The actual speed improvements depend on the specific application.
Another enhancement of PHP 7.2 is the libsodium extension, a cryptography library to make security easier to implement. The initial release of Zend Server 2018, however, does not yet distribute libsodium. Look for this in a future patch to version 2018.
Zend Server Admin And Configuration
A seemingly small, but helpful, convenience, IBM i administrators can now update Zend Server licenses from a green screen, rather than having to do it via the web-based Zend Server administration interface. Green screen license entry is more convenient when the web server is taken down for some reason.
Another time saver: Many configuration changes that formerly required a Zend Server restart can now take effect immediately. Examples: rules for Zend Monitor and Caching components. In my opinion, this improvement makes these components much more practical, because admins can experiment with settings without having to restart the web site.
Since Zend Server 9.1 (the previous minor release), a feature called Pulse has provided a high-level view of various functions. In version 2018, a Pulse view was added to Zend Server’s caching capabilities, such that administrators could now see how successful an application’s caching strategy was, showing the number of fetches, hits, misses, and size of the cache.
Zend Job Queue Enhancements
Zend’s Job Queue component (totally different than IBM i job queues) helps manage potentially long-running jobs such as PDF creation and SMTP (email) so that they run asynchronously, not slowing down end users.
The Job Queue component has several enhancements:
- Command line (CLI) scripts can now be managed by Job Queue.
- CLI scripts have an advantage over web-based requests. CLI scripts aren’t subject to web server timeouts, so can run for a very long time if necessary.
- Screen shot of how to specify a command line PHP script:
Notice that the “Executable” option allows “PHP” or “Other,” which means that any command-line program, not only PHP, can be run using Job Queue.
- The ability to end/abort a Job Queue script has been added.
- For long-running scripts, the script can declare the percentage completed, so that the script’s progress can be visible in the administrative user interface.
Deployment And Virtual Hosts
Since Zend Server 9.1, A/B testing has allowed system admins to roll out changes gradually. For example, an admin can roll out version 1.2 of an application to only part of a cluster, one or to nodes, and run it in parallel with an older version 1.1, and get feedback, before deploying across the cluster.
Also, a single application can be hosted on multiple virtual hosts that can be both secured (SSL-enabled) and non-secured.
Before, admins had to manually edit the vhost files, difficult to maintain. Now it is easy to maintain multiple vhosts per application.
Looking Ahead To The Future
The PHP community has already been sharing ideas for PHP 8, which you can see at this link. These thoughts are quite preliminary, or as Suraski put it, “A discussion about the discussion.”
The potential enhancements for PHP 8 or beyond include:
- Just-In-Time (JIT) compilation
- Foreign function support, would make it very easy for PHP to call native code libraries written in C or C++ without having to write an extension, allowing PHP to execute CPU-intensive apps much more efficiently, while not compromising on developer productivity.
- Farther afield, improvements to help PHP grow beyond traditional web applications:
- Considering adding to the current successful architecture, which is a very safe one for web applications, to allow highly concurrent connections, as Node.js does today. The current model, however, will always be supported. PHP is known for backward compatibility, which helped enable its success in the enterprise.
- Async I/O support will be considered.
The Evolution Of PHP
Originally created to build web sites, PHP has kept pace with today’s world of Application Programming Interfaces (APIs), which connect applications, systems, and new kinds of front end frameworks. Zeev points to projects such as Apigility as a way to simplify the creation of web services, or Zend Expressive for a general purpose PHP framework providing the most flexibility.
I asked Suraski how PHP compares to other languages today and why PHP is used in millions of applications. He said that PHP makes it “virtually impossible to shoot yourself in the foot” because each web request is independent. Even if one script has a bug or crashes, other scripts and users are unaffected. Even as PHP evolves and improves, as with version 7.2, the language has retained the core values that made PHP popular with a wide range of developers.
An IBM Champion and founder of Seiden Group, Alan Seiden leads a team that mentors clients in building APIs and web/mobile applications using open source, PHP, Python and IBM i business logic. Alan’s passion for the IBM i community inspires him to host the bi-annual CIO Summit and offer a free monthly tips newsletter.