The digest of interesting news and materials from the world of PHP № 41 (May 2014)
After a short break, the PHP digest is back in business! Your attention compilation with links to news and materials.
Enjoy reading! ')
News and Releases
PHPNG - The developers presented a new generation PHP interpreter. It all started with the message of Dmitry Stogov in php.internals and the corresponding branch in the repository. An analysis of the interpreter’s performance in real-world applications has shown that the problem of performance lies in the methods of working with memory and organizing the storage of data structures. That is why PHPNG is an optimized Zend Engine in which new data structures are implemented. Refactoring has already allowed to increase performance by 10-30% in real applications. Probably PHPNG will form the basis of PHP 5 ++, but for now this is only the beginning and the project is developing very dynamically. More information about PHPNG can be heard firsthand in the author's report at the upcoming DevConf 2014 conference - “Give your PHP for pumping - PHPNG is a new generation engine” .
Beta releases of PHP 5.6.0: beta 2 and beta 3 - Updates contain only a set of fixes, which means that the final release is left to wait quite a while. Nevertheless, another beta and a couple of release candidates are expected, but for now you can see the list of new features or watch a ten-minute video with their demonstration .
PHP releases: 5.5.12 , 5.5.13 , 5.4.28 , 5.4.29 - Regular updates of the current interpreter branches. Contains a number of fixes including security issues, such as the PHP-FPM vulnerability, which allows a local user with access to the php-fpm UNIX socket created by default with 0666 permissions to execute arbitrary PHP code with the permissions of the working FastCGI process pool .
New PHP on Heroku - HHVM and Hack support has been added to the most popular Heroku cloud platform.
Apigility 1.0.0 - The first stable release of the automatic creation tool for RESTful applications based on Zend Framework 2.
Laravel Forge - At the recent Laracon conference, the author of the Laravel framework presented the Forge tool, which Taylor himself described as “PHP-based instant cooking platform in the cloud of your choice.” Forge allows you to deploy an application with Nginx 1.6, PHP 5.5, MySQL / Postgres, Redis, Memcached, Beanstalk on any popular cloud hosting in a matter of minutes. Extensions for Forge , tutorials , and a series of detailed screencasts on the use of Forge are available. . For convenience, you have to pay $ 10 per month.
Release Laravel 4.2 - From now on, the framework requires PHP version not lower than 5.4.
DevConf 2014 - Let me remind you that in two weeks a large-scale web development conference will be held in Moscow. Section PHP pleases interesting reports on phpng, Yii 2, Laravel, AOP, Codeception.
Php
RFC: “Call to a member function of a non-object” catchable — The implementation of this clause allows you to handle errors, rather than generate fatal ones, when calling methods on null: $x = null; $x->method();$x = null; $x->method();
RFC: loop_else - Offer to add the ability to use an else-block in loops that will be executed if the loop condition is not met even once, that is, when it does not enter the loop body.
Pomander - Another PHP tool for deploying applications.
rss-bridge - Feed for sites that do not have one: Twitter, GoogleSearch, Instagram, Pinterest and others.
Monga - A simple and fast layer of abstraction for working with MongoDB.
glip - Git-library for PHP, allows access to the repository from PHP, even without Git installed.
atoum - A simple, modern unit testing framework for PHP.
TimeTraveler - The tool allows you to manually set the current date, and accordingly change the result of all subsequent calls to date functions.
Study materials
Strangle your API calls: RateLimitBundle - The author implemented a symfony RateLimitBundle bundle that allows you to limit the number of calls to the API method by specifying a parameter in the @ratelimit annotation to the controller or action. In the post about the features of implementation, the pros and cons of the solution.
Community Hack - Since the official release of Hack in the past, quite a bit of time, and a community and specific tools, such as the framework framework BeatBox and hack-mvc , are already being formed
Dangerous getimagesize () or Zip Bomb for PHP - A small overview of the vulnerability in a common PHP photo gallery engine and how you can put any website using getimagesize () using a bearded zip bomb (or a peta bomb).