The digest of interesting news and materials from the world of PHP No. 29 (October 20 - November 10, 2013)
We bring to your attention another collection with links to news and materials.
Enjoy reading! ')
News and Releases
php.net was compromised - on October 24, Google marked the site php.net as containing a threat and later the fact of hacking was confirmed . Fortunately, the performance of the resource was quickly restored. Detailed analysis of the problem and malicious code can be found here .
Backdrop - Fork Drupal 7, the purpose of which is to keep the audience of Drupal users, for whom the ease of learning and use is more important than architectural flexibility.
Bolt 1.3 - A fresh version of CMS, built on the basis of the Silex framework and symfony components.
Php
RFC: Engine Exceptions - The most awaited offer! Finally, instead of fatal errors, it will be possible to use exceptions.
RFC: Ripples - Offer to add support for another way to handle errors other than exceptions. So far, without a patch, but only in order to find out the expediency.
RFC: list_reference_assignment - A small improvement is also proposed, making it possible to do an assignment by reference in the list: $array = [1, 2]; list($a, &$b) = $array;$array = [1, 2]; list($a, &$b) = $array;
Functions in PHP 5.6 - what's new? - An excellent overview of the proposals already taken for PHP 5.6 and those that are still under discussion.
Instruments
Deployer - A simple and convenient tool for deploying applications written in PHP.
phpsh - Advanced REPL for PHP from Facebook. Written in Python :-)
Samsui - Library of object generation with test data. The author was inspired by Rosie for javascript and factory_girl for ruby.
Flysystem - A library that abstracts work with files, which makes it easy to use both the local file system and the remote one without changing the application code. In addition to local, S3, Dropbox, FTP and SFTP are already supported.
phpmig - Excellent implementation of migrations for PHP.
PHP-VCR - A tool by which you can forget about creating mocks for external services. Just make real requests to the API, and the VCR will record them, after which the recorded answers can be used in tests. The tool is based on VCR for Ruby and nock for Node.js.
php-extsample - Mikko Koppanen, which supports many popular PHP extensions such as imagick and php-zmq, created a small training extension that will be an excellent starting point for creating your full-fledged extension. Also, if you are interested in developing extensions, I recommend paying attention to the PHP-CPP - C ++ library specifically designed for developing PHP extensions.
Gutscript - Programming language translated in PHP, which allows to reduce the syntactic structures and simplify the code. In short, CoffeeScript for PHP on Go.
Study materials
GitPHP in Badoo - A story about solving performance problems in GitPHP.
Use arrays in PHP correctly - Debugging PHP code often deals with arrays. The author gives recommendations on their proper use in order to simplify debugging.
Yii: Active Record, Routes and Caching - Tutorial reveals the use of Active Record, URL management and caching in the Yii Framework 1.1 using the example of creating a simple application.
Map service with PHP and MongoDB - Tutorial on creating a simple map service. MongoDB with its spatial-capabilities is used for data storage, and the application itself is implemented on Silex. To work with the map, the author uses Leaflet.js .
Secure random numbers for PHP developers - A look at the available methods for generating random sequences in PHP and in particular the use of /dev/(u)random . Particularly relevant in light of the recently published demonstration of the predictability of mt_rand () .
Beyond Inheritance - In his previous post, Anthony Ferrara analyzed the use of design patterns. This time, the author dwells on the concept of inheritance, considering the weaknesses of classical inheritance.
Debugging PHP applications using HHVM - Tutorial on using HHVM in debug mode. It is shown how to step through the code, set and manage breakpoints, inspect variables.
HHVM on Heroku - HHVM is now possible on the popular Heroku cloud platform.
Understand Zend Framework 3 ... until it comes out! - In the post, the author provides resources on which you can get relevant information on the upcoming release of ZF3, and also writes about why it is useful to keep track of them.
Reviving the GoPHP5 Initiative - In 2007, activists from the PHP community took the initiative to GoPHP5, urging developers to switch from PHP 4, which is still popular at that time, to PHP 5. A similar situation has developed now. Despite the fact that PHP 5.3 support has already been virtually discontinued, version 5.4 is used by only 10% of sites according to statistics from w3tech . PHP-FIG discusses the idea of launching a campaign to popularize current versions of PHP.