PHP Annotated Monthly – July 2015
Our July issue of PHP Annotated Monthly is here, bringing you updates on PHP, frameworks, tools, tips for coding, community, and more. Read this month’s digest curated by Mikhail Vink, PhpStorm Product Marketing Manager.
PHP got its monthly update with versions 5.6.11, 5.5.27, and 5.4.43 released. Updates are focused on routine bug-fixes; the changelog is available as usual.
Please note that according to php-internals announcement, the PHP 5.5 branch is going to enter security-only mode, and at the same time PHP 5.4 support will finally be discontinued. We definitely recommend switching to PHP 5.6 if you haven’t done so yet.
In the meantime, PHP 7 reaches Beta 1, which marks the feature-complete phase. No more fundamental changes are to be expected. This release brings over 200 commits with about 25 reported bug-fixes, as well as security, stability and other improvements.
PHP 7 Tutorial by Guillaume Dievart will help you to familiarize yourself with some of the language features in PHP 7. This tutorial takes the form of a simple exercise where you will be asked to solve or fix a bug. Each step corresponds to an RFC and is accompanied by a short explanation.
A good overview of PHP 7 features and major improvements is provided by Thomas Punt in PHP7-reference. Lorna Mitchell blogs on PHP 7 benchmarks and performance of PHP 7 (and she also points out that you first need to migrate to PHP 5.6 or at least PHP 5.5 first). Digital Ocean’s Erika Heidi blogs on getting ready for PHP 7.
Nikita Popov publishes his slides on what’s changed in PHP 7 internally which will give you a good overview on what’s going on there as well. The second part of his internal value representation in PHP 7 has also gone live (make sure to read part one first though).
PHP 7’s changes related to throwable exceptions have been covered by both Davey Shafik in changes to engine exceptions in PHP 7.0 alpha 2+ and by Aaron Piotrowski in throwable exceptions and errors in PHP 7: exploring the exception hierarchy of PHP 7.
This month two new static analyzers for PHP have been released and attracted some attention: meet phan by Rasmus Lerdorf and Tuli by Anthony Ferrara. Both tools are in active development now, so shouldn’t be used for production.
Julien Pauli tells a story of PHP closures: history, introduction of closures into the engine, related internal problems, and more.
A factory should create, not retain post has been published by Paul M. Jones following a recent reddit thread on service locators in controllers.
More interesting reads come from Christopher Pitt in his recursion and generators, Davey Shafik with class constants, how do they work? (or you learn something new every day…), Giorgio Sironi in property-based testing primer, and everything you need to know about preventing cross-site scripting vulnerabilities in PHP from Paragon Initiative.
Frameworks and Tools
Many major frameworks and CMSs have been updated this month: Symfony 2.7.2, Symfony 2.6.10, Symfony 2.3.31, Laravel 5.1.4, CakePHP 2.7.0 & 3.0.7, Drupal 8.0 beta 12, Drupal 7.38, Drupal 6.36, WordPress 4.3 beta 3, and others.
In the Symfony world, create your PHP framework documentation has been published overviewing different Symfony components and concepts that can be used to base your new PHP framework on Symfony. Jani Tarvainen blogs about PHP and Symfony: Structure, Stability and Flexibility. Kévin Dunglas talks about using PSR-7 in Symfony.
Moving to HHVM/Hack news, Symfony announced that Symfony 2.3 achieves 100% compatibility with HHVM. HHVM 3.8.0 just got released with performance improvements from HHVM lockdown. Along with the changes detailed in the post targeted specifically at open-source frameworks like WordPress, MediaWiki, and Drupal, this release also contains the results of Facebook’s internal performance team’s lockdown. While the internal team focuses on performance of Facebook’s code specifically, many of the changes they made will improve the performance of all PHP and Hack code. In a recent post, the Hack team also explains trait and interface requirements in Hack.
Nuclide, a new IDE by Facebook (based on Atom) for Hack and React, has been open-sourced, and focused around remote development, Hack language support, Flow support, and more. You might be also interested in why hack language support in PhpStorm has been postponed (as native tooling such as Nuclide is one of the major reasons).
Google App Engine for PHP is generally available, and App Engine’s Service Level Agreement and Deprecation Policy now extend to App Engine for PHP.
PHPpackages.org was built to define popularity ranking for PHP packages, provide a space for discussion, and discover which packages use a specific package.
Drupal has announced Drupal 8 security bug bounty program, so that anyone can get paid to find security issues in D8.
The CodeClimate launches the Code Climate Platform—the first open, extensible platform for all types of static analysis. They’ve open-sourced the analysis tools, including the engines and algorithms they use to evaluate code. They’re also enabling anyone to write static analysis engines that run on their servers by following a simple specification.
Frank de Jonge posts on packages vs components and dependency problems and tells you why you shouldn’t rely on framework components and shouldn’t rely on concrete implementations.
Regarding virtualization and remote development, you might be interested in SitePoint’s article on re-introducing vagrant: the right way to start with PHP by Bruno Skvorc, and Joeri Verdeyen’s post on how I develop in PHP with CoreOS and Docker.
Community and more
Official PHP mascot (elePHPant) can be ordered now from a new website with worldwide delivery. Both blue and pink options are available. On a side note, a TrueNorth PHP woolly mammoth plush toy has just been funded on KickStarter.
Some interesting PHP cheatsheets can be found here; currently the website features PHP cheatsheets for variable comparison, variable arithmetic, and variable testing.
Sammy Kaye Powers shares his insight on how to contribute to PHP documentation which might be a good start if you have never contributed to PHP so far. With a new version of PHP coming soon, good documentation is indeed an important topic, and all contributions are welcome.
There are more and more great composer packages dependencies/etc. visualizations, and here is a good one, in a form of software galaxies, by Andrei Kashcha.
Matthias Noback shares his thoughts on compartmentalization in the PHP community talking about the real community, PHP drama, fights and ways to stay independent while being a part of the community.
And if you’re up for listening to something interesting, don’t miss the great PHP Podcasts resource by Cal Evans, where you can find all PHP-related podcasts so that you follow all the community discussions. There are many podcasts on the list: Dev Hell, ElePHPant in the Room, Loosely Coupled, PHP Town Hall, PHPRoundtable, run-geek-radio, Sound of Symfony, That Podcast, Voices of the ElePHPant, and many others. Enjoy!
Did you find an interesting read? Have news to share? Or just want to comment on this post? We’d love to hear from you in the comments below. Feel free to reach out to our PhpStorm product marketing manager @mikhail_vink on Twitter.
See you in August!
Develop with pleasure!
– JetBrains PhpStorm Team
Subscribe to Blog updates
Thanks, we've got you!