The digest of interesting news and materials from the world of PHP over the past two weeks, number 13 (03/12/2013 - 03/25/2013)
We bring to your attention another collection with links to news and materials.
Enjoy reading! ')
News and Releases
PHP 5.5.0 beta1 has become available - Finally, the debate over the inclusion of Optimizer + in PHP has subsided and the epic with alpha releases has come to an end. The development team introduced the first beta version, which includes OPCache (formerly known as Zend Optimizer +). In addition, a new array_column function has been added. , and in the foreach loop support for non-scalar keys is implemented. A full list of changes is available here , there is also an instruction for upgrading to version 5.5, which includes a description of all the changes, and a handy summary of the innovations in PHP 5.5 with links to the relevant RFCs. If you want to help test the latest version, we recommend that you familiarize yourself with this post . The next beta is scheduled for April 4th.
PHP 5.3 has become the most popular version - According to a report from W3 Techs , 3 and a half years after the release, the PHP 5.3 version outperformed version 5.2. Support for the latter, as you know, was suspended in 2010. And despite the fact that with release 5.5, support for version 5.3 will also be suspended, current 5.4 is used on only 3% of sites. The comments also noted that according to Wordpress installation statistics for this CMS, the version of PHP 5.2 still leads with 60%. Well, let's see how the dynamics change with the release of 5.5.
26 ways to show that PHP can be even better - In the article, the author provides a large list of features that are missing in PHP. And for each such opportunity provides links to existing implementations.
We meet array_column () from PHP 5.5 - the author of a post is also the author of this function. And in his little note tells about the history of the function (it was originally written for PHP 5.2), and then gives examples of use.
Be responsible for choosing the requirements for your PHP package - The author of this excellent post encourages package developers to be responsible and not to specify PHP 5.4 in the requirements (not to use) if the only applicable feature from 5.4 is the short array syntax. PHP 5.4 is more than just []. The short syntax of arrays will make your code just a little prettier, which 90% of users will not even see. Let the choice of version remains with the user of your package.
New Relic for PHP: Monitoring Web Application Performance - New Relic continues its aggressive PR campaign, so there is hardly a developer who has not heard about them. The post is a small tutorial on the use of this service and contains instructions for installing and configuring the required extension on the server, as well as an overview of the capabilities of the service.
We extend Iterator to make the code cleaner - A small post in which the author demonstrates a great idea - an Iterator extension. Instead of words, just take a look at the example given by the author.
PHP project management - Despite the title, the post contains general and non -PHP- specific recommendations for project management. In short: be specific, be pleasant, be flexible, and hope for the best.
From Java to PHP - Not very often you will find developers who have switched from Java to PHP, but the author of the post just ran into these and shares recommendations and tips for them on migration to PHP.
Pro Workflow in Laravel and Sublime Text - An article on how to streamline workflow when creating applications on the Laravel framework in the popular Sublime Text editor. Examples show how to create resources, work with Artisan teams, migrations.
Practical aspects of the Adapter design pattern - The author of the post briefly reveals the essence of the Adapter pattern, describes the principles of its effective use. In addition, examples of bad and good use of this template are shown.
Mocking with Phake - Tutorial, which demonstrates the use of mock objects in Phake, a unit testing tool that is slightly different from the built-in mock implementation in PHPUnit and Mockery. Read more about Phake here .
Integration of the Solr search engine in PHP applications - A popular solution when choosing a search engine is, of course. Sphinx. Another possible solution is Apache Solr. The post is just a step-by-step introductory tutorial with examples on how to use Solr to implement full-text search. There is also a note about using Solr with Drupal.
Always return value - In the first post, the author suggests that the methods and functions in most cases should return some non-null value. After harsh criticism in the comments, the author acknowledged that he was not quite right and published a sequel , in which he writes that although there are many cases when returning null is quite acceptable and necessary, there are also cases when developers allow returning null while this is not should do.