PHP 7 compatibility through Symfony Polyfill, not transpiling
Update: Transphpile, A PHP 7 to PHP 5.6 transpiler has been made since the writing of the article :)
PHP code can be executed in exotic ways (with JPHP, HippyVM or Quercus), but it never had a transpiling compiler before the Hack transpiler. The Hack language from Facebook runs on the PHP compatible HHVM runtime is a completely separate language.
Transpiling and polyfills are complementary techniques, not outright alternatives. Both have their limitations and certainly performance loss, but they're still a pragmatic method for moving to the latest version of the available language.
The 3.0 incarnation of the Symfony Framework bumps up the PHP requirement to 5.5. This is likely the motivation behind the creation of a polyfill now available in the form of the Symfony Polyfill component:
This project backports features found in latest PHP versions. It also provides compatibility PHP implementations for some extensions and functions. You should use it when portability across PHP versions and extensions is desired.
Adding the polyfill allows adopting certain features provided by PHP extensions (written in C) and PHP 7 language features to environments that lack native support for them. The effort is still quite new, but it enables developers to use PHP 7.0 features like random_bytes and random_int functions with PHP 5 compatible runtimes (such as PHP 5, HHVM and JPHP).
PHP has always had a simple development routine: Edit code, save and reload browser. No compilation or other steps have not been required. It is integral that this strenght is kept and by nature the polyfill model is a better way of achieving this. Polyfills are more limited as language features like the spaceship operator can not be added using this method.
By studying the composer.json of the component you can see it's also reusing previously made polyfills instead of writing it's own. Learn more about the Symfony Polyfill component in the PR: A new component for portability across PHP versions and extensions
Not everyone (can) run bleeding edge
In the past shared hosting was popular and the move from PHP4 to PHP5 was not straightforward in an environment with both versions in production use. Nowadays VPSes or PaaS with latest versions are the norm for many, but there are still plenty of production servers running older PHP versions for various reasons.
PHP 5.5 is the current oldest supported PHP version, but PHP 5.3 on RHEL/CentOS 6 will receive Security Fixes from RedHat/CentOS until November 30, 2020. For these cases the Symfony Polyfill component can be a godsend. So the next time you're writing code for a limited hosting environment, take a look at what it has to offer.
HHVM from Facebook Open Source has grown into a credible PHP environment. Wikipedia, Etsy and others use HHVM in production. PHP 7 is a new version of the language that introduces a new PHP engine and improvements to the language itself.
The HHVM project plans to keep up feature parity with the main PHP implementation, so we should get PHP 7 features in the future. But with PHP 7 release imminent, using polyfills together with HHVM seems like an ideal solution, especially since the Symfony project itself is 100% HHVM compatible.
The introduction of the Polyfill component from Symfony is a great opening. A transpiler that does not break the development flow would be welcome as well.