The first beta version of PHP 7.1 has been released and its time to have a look at the next iteration of the PHP 7 series. You will find a set of packages in my repository:
[php] Server = https://repo.pierre-schmitz.com/$repo/os/$arch
Insert these lines on top of the other repository definitions in your
/etc/pacman.conf. A copy of the PKGBUILDs I used to create these packages are available in my git repository.
I intend to update these with beta versions and release candidates till the final release of PHP 7.1.0 later this year. Even though I will try to provide a smooth update path, please be prepared to encounter problems.
Despite of a having a new module API, third party modules seem to work fine after a simple rebuild, in contrast to our first contact with PHP 7. All these modules are available in my repository as well.
With the new minor release we will get more improvements of the scalar and return type declarations introduced in PHP 7.0. My favorite new features are:
- Nullable Types
Being able to declare a type to be either specific or null was a missing feature in version 7.0 which lead people to not declare any type at all.
- Void Return Type
You are now able to declare a function to never return anything; another missing piece of the new return type declarations.
- Iterable type
We are finally able to declare a type that matches an array but also classes that implement the Traversable interface. In short it is anything you can use with
foreach(). This means we no longer need to put primitive arrays into traversable objects if we like to use type hinting.
- Class constant visibility modifiers
Using constants internally is less awkward as we are now able to declare them with private visibility. People no longer need to abuse private properties to document that certain constants should not be used from a foreign context.
A complete list of changes can be found in the PHP 7.1 NEWS file. Also see the continuously updated UPGRADING file.
Testing and benchmarking
While PHP 7.1 is still under development the packages I provide are configured with production settings. Optimizations are turned on, all debugging functions and information are disabled and stripped from the binaries. This means you may use these to test and benchmark your applications and server setups.
Let me know of any issues and share your experiences with the first minor update of PHP 7.