30+ Links to PHP Training Materials, News about Zend Optimizer+, MySQL 5.6 Release and More
The PHP Digest was prepared for you by Zfort Group development team.
News and releases:
- What’s new in MySQL 5.6 — 2 years passed since the release of the latest version. This new long-awaited release contains many new features and improvements, especially for the server performance. It is noteworthy that a little earlier Fedora and openSUSE have announced their intention to replace MySQL with MariaDB in the default installation.
- Zend Optimizer+ may be included into PHP 5.5 — there’s an unexpected news that an extension for an Opcode Cache can be included into the next PHP release. Similar assumptions were heard more than once, and APC was natural candidate. But Rasmus Lerdorf and other core-developers often stated that APC had not reached a stable stage yet and it included too many bugs to be integrated into PHP. And Zeev Suraski, replying to a question in php-internals, suggests the possibility of making Zend Optimizer+ open source and its inclusion into PHP 5.5. However, the alpha releases have not been planned in the actual schedule. That means that the new capabilities are not expected yet. But the community took this news with enthusiasm, and there are chances that the extension will be included into v.5.5. The published RFC document contains a comparison of Optimizer+ with APC among other innovations. Three possible scenarios are expected to be taken on voting: 1. Integration of Optimizer+ into PHP 5.5.0 with delay of the release up to 2 months; 2. Integration of Optimizer + into PHP without delay of release of 5.5; 3. No integration of Optimizer + into PHP, providing it as an optional component available from PECL.
- Zend Framework 2.0.7, 2.1.0 is released. 2.1.1 followed right behind. v.2.0.7 release represents an impressive changelog, and v.2.1.0 release contains many improvements, including new features to work with push-notifications for iOS and Android devices. v.2.1.1 version introduces a number of fixes.
- Web&PHP magazine, Issue 11 — the latest issue covers the following topics: PHP in the cloud, develop your Agile mindset, database indexing and others.
- phpMyAdmin 4.0.0-beta1 is released — HTML frames are finally removed in this version.
- PHP 6 pissing in the wind — an excellent post where the author shares his opinion on the current situation in the PHP community. He cites an example of problems in the language that are constantly blamed by PHP-haters, such as: inconsistency of parameters, absence of scalar objects and Unicode support. First, the author gives a clear, in his view, solution and then explains why there are no changes made yet. He believes that there are too many conservative-minded individuals among core-developers, and that’s why implementing any major changes often fails, as it happened with theaccessors. The author calls for progressive changes, and calls to retire those who do not want to work on such changes. The comments to the post appeared to be not less interesting, such as the detailed response from Zeev Suraski.
- PHP just grows & grows — the survey on the use of PHP for the last 10 years was published. In addition to the description of used metrics and estimation peculiarities the post also contains a brief history of PHP language.
- Real-World functional programming — the recent issue contains the detailed post on the current status of the functional paradigm implementation in PHP with an example of calculating the total cost of a shopping cart in a functional style. This time, pay your attention to the book full of ideas and techniques of functional programming.
- PHP traits, treat or threat? — a colorful presentation where the author describes the advantages and disadvantages of the new features in PHP.
- Zend Certifications Tips & Tricks,2 — an interview with one of PHPBenelux creators Michelangelo van Dam and just a famous blogger Lorna Jane Mitchell, in which they share tips and tricks for Zend certification, answering the questions: benefits of exams completion, how to prepare for exams, what needs to be studied and many others.
- Benchmarking cache transcoders in PHP — the necessity of data serialization occurs quite often, for example when implementing caching. Obviously the encoding of information takes some time. The author describes the results of testing with built-in serialize/unserialize methods, with igbinaryextension, and encoding in JSON-string.
- Laravel 4: a start at a RESTful API — although Laravel 4 is still in beta, there is already a lot of material on this framework. The tutorial describes construction of RESTful API with an example of creating a simple Read-It-Later app. The first part includes the following steps: setting the framework, configuration, use of migrations, use of ORM, authentication, routes setting (taking into account API versioning), creating a controller that implements creation, update, and receiving a list of resources.
- How to make async requests in PHP — an excellent post in which the author describes three ways to make asynchronous requests in PHP. These three methods do not involve the use of any external dependencies such as a queue server – everything is in pure PHP only: quickly socket opening without waiting for response; writing to a log file (pseudo query), fork of curl process. Short examples together with advantages / disadvantages of each method are provided.
- Parallel PHPUnit — a small post on use of parallel PHPUnit to run multiple sets of tests simultaneously. The author mentions possible problems related to state of the race and recommends to use of aParatest tool.
- Doctrine and SOLID — in his post, the author says that it is impossible to follow the principles ofSOLID using Doctrine 2 as well as it is quite difficult to save the Single Responsibility Principle. The author gives a few recommendations on how to improve the code.
- How to configure Symfony’s Service Container to use Twitter API — With this post the author continues his series about Symfony’s Services container 2 (1, 2). In the provided example, the author uses Guzzle HTTP library to create a service connected to the Twitter API.
- Logging with PSR-3 to improve reusability — a rather nice and detailed tutorial on how to create a simple logger for your application by following the new standard adopted recently.
- How to write code that embraces change — an excellent post, which provides an overview of all the principles of architecture design and coding of software that makes the code easy to change and maintain. Clear text is supplemented by easy examples in PHP.
- 8 practices to secure your web app — another post giving classic recommendations on security with examples in PHP.
- Simply scale with Nginx, Memcached, PHP-FPM and APC — a small guide on how to scale web applications using Nginx web server, memcached, PHP-FPM and APC.
- Managing PHP Application Builds with Phing — a good starting point if you decide to automate deployment of your PHP applications. The post provides basic information on use of the Ant-based tool, called Phing. The post also considers an installation via PEAR, the basic project configuration, a sample configuration to run tests on PHPUnit.
- Zend Framework 2 ServiceManager — the latest post introducing Zend Framework 2. Dependency Injection, modules and ModuleManager, EventManager have already been discussed in the previous posts. This time the author explores the ServiceManager component, talks about how to configure it, how to use it properly to simplify the development process, provides examples.
- Setting up a PHP development environment on a VPS — The author encountered a number of problems and inconveniences in the development on usual PCs and decided to use a VPS for this purpose. His experience is described in details in the post.
- When To Write Bad Code — in a short note, Brandon Savage, the author of The PHP Playbookand Mastering Object Oriented PHP, shares his thoughts on when, in his opinion, it is acceptable to write bad code. Ideas are not new, but quite useful as a reminder.
- Dependency Injection with Pimple — when developing applications, we try to create independent modules and components in order to make it possible to reuse them later. But it is quite a difficult task to create fully independent components. Moreover the dependencies can bring a lot of problems if they are not under a proper control. In this case, dependency injection is a great solution. The post explains how to use Pimple, a simple library implementing the Dependency Injection – made by one of the Symfony developers.
- Composer: Speeding up class autoloading — in the post the author shows an unusual solution which can speed up the classes with Composer by creating pre-symbolic links to files.
- Intro to PHP comments and Docblocks — a small post on how to comment code properly and construct Doc-blocks.
- Creating Yii applications with composer — the author of the post states that the updating of some specific packages can be rather risky when developing any web app. To solve this issue he represents a composer – the package manager for Yii 2 – describing integration of the composer with Yii 1.1 in the tutorial using Packagist as a standard repository.
- PHP: Single Sign On (SSO) Module for Kohana — in the post the author describes step-by-step implementation process of Single Sign On as a Kohana module.
- Composer Stability Flags — the author describes the way the “flags of stability” work in a composer and the problems related to the versions stability when using the composer. Also the author calls modules / extensions developers to tag their projects and indicate stability of their code in the repositories with the relevant branches.
- 1.5x … 9x faster queries with PHP and MySQL 5.6, really? — a few tests of fresh MySQL 5.6.
- Automated Refactoring — the author represents the whole process of the automated code refactoring as well as describes its principles and solving methods.
- Catch Fatal Errors in PHP — a short tutorial on how to catch the Fatal Errors and arrange them properly.
- SERVER_NAME Versus HTTP_HOST — the author describes the dependencies in relations between the Host header and SERVER_NAME in Apache, answering the questions of other bloggers on the current topic.
- Core Concepts: Attack Surface — the author tells us what the attack surface is and how this surface can be reduced, thus increasing the security of your application.
- Beware the Mass Assignment — a little bit more about how important it is to filter the user inputted data, what is the problem and how it can be dangerous.
- Oauth Authentication for Social Apps in PHP — a good introduction on how to use OAuth in PHP applications.
- Testable Code and SOLID at PHPBNL — PHPBenelux conference was held in Antwerp recently. The author of the post, who was one of the speakers, shared slides of his two reports: Testable Code (PDF) and SOLID (PDF).
- PHPBenelux Slides — Ilia Alshanetsky made reports at the same conference. The slides are:Application Logic Security and Introducing PHP 5.4(.11).
- Password Storage talk at PHP Benelux 13 — the slides and materials of the report by Anthony Ferrara from the same PHPBenelux.
- Server SQL Modes — the post contains official documentation on the MySQL server which allows users to know more about all the Server SQL modes and plunge deeper into their special features.