The digest of interesting news and materials from the world of PHP over the past two weeks, number 16 (04/22/2013 - 05/06/2013)
We bring to your attention another collection with links to news and materials.
Enjoy reading! ')
News and Releases
Nginx-1.4.0 has been released - Updated the second most popular web server in the world. A year of development has brought many innovations, such as support for SPDY. In addition, the project code moved to Mercurial.
PHP 5.5 beta 4 - This time the last beta, and the first release candidate is expected already on May 9th.
Phalcon 1.1 beta - By reference, a new version of the new features of the increasingly popular framework is implemented, which is implemented in C and comes in the form of a PHP extension.
PhpMyAdmin 4.0.0 came out - In this version, HTML frames are not used at last, the interface is built using JavaScript and the navigation bar is displayed as a tree.
Online PHP shell - Web-based tool that allows you to test the entered PHP-code in all versions, starting with 4.3.0 and ending with 5.5.0 alpha6.
Available public preview Yii 2 - Many have been waiting for this event! Words are superfluous, we hurry to touch the new version.
Experience with the new environment in Google App Engine - Very soon the Google I / O conference will take place, where the new environment for the App Engine will be demonstrated. Under the link - the announcement of the report, in which it does not mention which environment should be expected, however, some believe that this will be PHP, since its support is more demanded than others .
Php
Event-oriented PHP - Video recording of a great report from the author React - Igor Wielder . Details about the problems in the implementation of the asynchronous environment in PHP, the structure of React and other related topics. Recommended for viewing.
PHP should die, continued - At least a great post as opposed to the previous report. The author continues his thought and, using the example of React, demonstrates the inconsistency of PHP in the case when the script should work long and continuously.
PHP syntax hack - A good tutorial in which a small example shows how you can change the syntax of a language with minimal C knowledge. Applying a small Zend Engine hack, the author changes the syntax of the class declaration.
We execute dubious PHP code in a sandbox - Based on a PHP parser from Nikita Popov, the author of the post has implemented an excellent PHPSandbox library that allows you to execute any PHP code without allowing the call of potentially dangerous constructs. You can override any functions with your own. The example shows the “screening” of the mail () function.
Epic saga about switching to HipHop - One of the developers from Tuenti (a Spanish clone of Facebook) writes about the experience of migrating a huge project to HipHop , a virtual machine that allows you to compile PHP code into bytecode and then execute it, rather than interpret it every time .
Intro to Ctype - A small tutorial on Ctype functions designed to verify that a string is consistent with a type. In a post about what functions exist, how they work and how to use them.
HTTP - a protocol that a web developer must know - Continuation of a series about HTTP. In the previous section , basic information on the workflow, structure of requests, response codes, main headers was given. This time, connection processing, authentication, and HTTP caching are considered.
Simple Exception Logging in ZF2 - Another small, but useful post that shows how to use Zend / Log and event listener to easily organize the interception and logging of exceptions.
Performance test of popular PHP frameworks - A small test frameworks among which are Yii, CodeIgniter, Laravel, Symfony2, Zend Framework 2, Slim and others. The results are generally predictable, but the author calls to remember that the task of the frameworks is to speed up the development, and other measures can be applied to improve performance.
Add your packages for Composer on Packagist - A small tutorial for developers who want to include their libraries in the Packagist list. In a post about composer.json compiling, working with Packagist and syncing with GitHub.
List of 20 items to prevent XSS in PHP - The author writes that XSS is still one of the most frequently exploited types of vulnerabilities. That is why he decided to compile a list of 20 guidelines aimed at preventing XSS attacks.
Abstracting the delivery services API - A good tutorial that shows how to implement a universal interface for various delivery services so that when you add any new service you spend the least amount of time.
Laravel 4 - a simple site with a backend - The first part of a series of tutorials on Laravel 4. Fasting will be a good starting point for those who want to start working with this framework, the best practices are taken into account.
Implementing the configuration in the ZF2 controller - A small post that shows how you can add configuration information to the Zend Framework 2 controller using an additional interface and initializer from the ServiceManager. Read more about the approach already written here. .
Functional testing with Mink - A good tutorial in which the author demonstrates the use of Mink - the Behat extension. Installation, configuration and simple examples.
Testing and Contributing with Composer - A short post describes how to promote the development of third-party libraries and how Composer can help with this.
Testing “with a nice smell” - Try / catch - The author defends the opinion that using try / catch blocks in tests is a bad practice. Instead, the available PHPUnit capabilities should be used: @expectedException or setExpectedException (). The post also contains several other recommendations for writing unit tests.