PHP 7.1 beta packages for Arch Linux

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.

Packaging

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.

New features

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.

6 thoughts on “PHP 7.1 beta packages for Arch Linux

  1. I’m getting this error when using Composer:

    > php: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory

    It seems this now depends on Readline 7.0 which is in [testing].

  2. I am having some trouble running a certain script. The strange thing is that it only happens when serving through Apache, not when running it directly from the terminal.

    This is what triggers the crash:
    cd /srv/http
    git clone https://github.com/rev42/tfpdf.git

    When I run “php tfpdf/src/tFPDF.php” in the terminal, there are no issues.
    But if I now browse to http://localhost/tfpdf/src/tFPDF.php there is the following in /var/log/httpd/error_log:
    [Wed Dec 07 14:32:16.803622 2016] [core:notice] [pid 659] AH00052: child pid 27644 exit signal Floating point exception (8)

    Can someone confirm this? Where should I open a bug report? I have configured Apache with libphp7.so

    • To clarify: all other tests (including large webapps) work fine. It only happens with tFPDF.

    • I’ve tracked it down to OPCache (explains why it doesn’t crash from the terminal).

      Uncommenting “zend_extension=opcache.so” in php.ini causes the crashes.
      With it commented out, or setting “opcache.enable=0”, there is no problem.

      Seems to be related: https://github.com/Setasign/FPDI/issues/9

      In any case, it is not a packaging or Apache/libphp bug, as I suspected. I’ll continue investigating and open an upstream bug if necessary. In my opinion, ignore this and push the new php package to the stable repository as you see fit.

Comments are closed.