PHP Digest: Symfony 2.2.0 Released, Functional Programming and PHP, Behavior Driven Development and Much More!

March 13, 2013

News and Releases:

  1. Optimizer+ will be integrated into PHP 5.5 — during the past fortnight there was a number of events related to Zend Optimizer+ integration into PHP. According to the voting three possible scenarios were considered: 1) To integrate Optimizer+ into v.5.5 even if it delays the release a little; 2) If it's necessary to delay v.5.5 release because of the integration, then to integrate Optimizer+ into v.5.6; 3) Not to integrate into PHP at all, just making it available through PECL. At first the package became available from PECL, and then by voting results Zeev Suraski announced the inclusion of Optimizer+ as zend_extension into PHP by default. Integration into the core is planned in v.5.6. The announcement has provoked lots of disputes as some voters believe that such decision requires approval of absolute majority to be implemented. Still, the Optimizer+ integration has no effect on the syntax of the language. Moreover the corresponding option in php.ini is supposed to be turned off by default.
  2. PHP 5.5.0 Alpha6 released — the release contains just a few bug fixes found in the previous alpha, but nevertheless it's remarkable because it serves to delay the release of the next beta that will already include integrated Optimizer+.
  3. Symfony 2.2.0 released — the long-awaited release that's been under development for a half of a year. See more details in the post.
  4. Phalcon 1.0.0 beta released — a year has passed since this unusual PHP framework appeared and now we have its first version.
  5. Web&PHP, Issue 12 — the anniversary issue (the magazine is being published for a year) includes the following: using recursion with PHP; the power of PECL; fixing PHP production problems with APM and many other interesting topics.
  6. On PHP-FIG — Matthew Weier O'Phinney, an architect and Zend Framework project lead announced his intention to leave PHP-FIG, a group that accepts PSR standards. In the post the author gives the reasons which made him to take such a decision. In short, there are more important things the author would like to spend his time for, instead of arguing about if to use tabs or spaces, where to put braces, etc.

PHP:

  1. How foreach actually works — the most detailed description of the technique is on StackOverflow. Core PHP developer Nikita Popov explained in details the process of foreach operating cycle.
  2. The next big thing in PHP — having described their vision of the current state in PHP, the authors assume that PHP will just disappear in the nearest future if nothing is going to be changed. The authors are sure PHP 6 must contain fundamental changes focused on the performance and see no sense in backward compatibility. In addition the authors make a really important proposal: to create a possibility for common PHP users to participate in development of the language. One of the authors has even created a corresponding RFC, with proposition to add open voting to php.net, in order to get feedback from users.
  3. On predictable PHP release cycles — a small post in which the author mentions the recent events related to Optimizer+ and suggests that a stable and predictable release process is very important for developers. According to him a hasty integration of Optimizer+ as zend_extension into PHP doesn't have any sense as it won't appear on shared hosting even in a year while those who are able to use the latest versions of PHP on the server can just get Optimizer+ via PECL.

Training Materials:

  1. Functional Programming and PHP — the topic has been already mentioned in one of the digest's issues recently, but nevertheless this is a rather good post that reveals the basic principles of functional programming and their use in PHP.
  2. Space efficient binary Bloom filter — the post unveils the way how to save a lot of space with Bloom filter implementation when coding in PHP.
  3. Unit Testing with PHPUnit, 2,3,4 — a complete guide on unit testing for beginners that consists of four parts covering everything from an intro to PHPUnit out to some more advanced techniques.
  4. Steps to take when your PHP website appeared to be hacked — in the previous post the author described techniques used to find out if your website was hacked. This time the "treatment techniques" are discussed allowing us to get rid of the malicious code. In addition, there are recommendations on how to prevent repeated hacking and infection.
  5. Integrating open authentication using Opauth — a small tutorial on how to use the multi-provider framework for authentication via OAuth in PHP applications. An example of integration with CodeIgniter is given in the post, but there are implementations for all popular frameworks. The list of strategies is really impressive.
  6. PCI Compliance and the PHP Developer — the post briefly describes the PCI standards, their basic myths as well as gives an overview of their main principles. The author gives detailed description of issues directly related to the back-end web development.
  7. Installing XHGui — a small tutorial on how to install and use different tools for code profiling. A little more detailed tutorial is here.
  8. Contributing to Paratest — a small post in which the author explains the advantages of using Paratest tool for parallel execution of tests, talks about new improvements that have been suggested by third-party developers and encourages everybody to participate in the project development.
  9. Scaling Silex applications. Using RouteCollection — in the post the author improves his sample of the application from the previous post on scaling Silex apps using RouteCollection to determine the routes instead of DI container from Symfony. The complete code is available on GitHub.
  10. Behavior Driven Development — a small overview of BDD concept in general and Behat particularly.
  11. D is for Documentation — the author explores the last concept of the LUCID set - documentation. By analogy with the TDD the author offers his approach to programming - Documentation Driven Development. The approach assumes that the developer first writes documentation and code comments, then tests and then starts coding. The post also includes a small example demonstrating this approach (without any tests).
  12. PHP-FIG's challenges, efficacy and attitude — the news that one of the key persons is leaving PHP-FIG caused a lot of rumors. Although the author of the post is not a member of the PHP-FIG, he discusses the future of the group in details. Except the post itself, please pay attention to the comments which also contain interesting thoughts on the subject.
  13. Building ePub with PHP and Markdown — a good tutorial that shows us how to create ePub-book through md2epub and RainTPL libraries using Markdown-documents.
  14. Valitron: the simple validation library that doesn't suck — the author tried to find a simple and convenient library to validate user data which wouldn't be cumbersome and wouldn't have any dependencies. Failed to find such library the author has created his own Valitron library with all the features mentioned above. More examples can be found on GitHub.
  15. Rock On, Refactor, or Re-roll? — You have definitely faced such situations when developing something for yourself you have to delay the development for a while and coming back to work later you find out that many parts of the code could look different/better. In this case, you have a choice: just to continue, to make code refactoring or to rewrite everything from scratch. The post describes such situations. The author tells us about his experience and gives some recommendations.
  16. Making Conferences Better — the author of the post is a real fan and a regular speaker of PHP conferences. The author shares his ideas how to make the conferences more useful and more interesting for a wide range of developers.
  17. Preventing Code Rot 101: Unit Testing — the post tells us about the "software rot". Certainly the code doesn't change over time but the environment can vary greatly, and this can lead to unpredictable results. The authors make a number of recommendations and examples of code testing in order to avoid this problem.
  18. Your One-Stop Guide to Laravel Commands — a large and detailed tutorial on Artisan - command line utilities in Laravel and custom commands writing.
  19. Why .htaccess (AllowOverride All) should not be used in production — the author of the post has already published the results of a small research “Why is FastCGI /w Nginx so much faster than Apache /w mod_php?” on his blog. In his study the author found out that when using Apache the AllowOverride All directive appears to be its main bottleneck. This time the author published a little more detailed research providing an example of httpd.conf configuration for Magento.
  20. RESTful APIs with ZF2, Part 3 — continuation of the posts on building RESTful interfaces. The author keeps on the description of the REST general concepts studying your API documentation process.
  21. Overloading: Create PHP Class Methods on the Fly — in most programming languages overloading means the ability to describe several methods with the same name and a different number of arguments. Overloading in PHP means the ability "to create" properties and methods dynamically. In the post the author shows the use of such "overloading".
  22. Confoo: Testing, Performance, Metrics and APIs — slides of several useful reports from Confoo conference held in Montreal recently.
  23. PHP has reached its limit — the author moved from PHP to Ruby comparing solutions of typical tasks on Rails and TYPO3, demonstrating PHP weaknesses. Maybe it's time to stop?
  24. Code quality — the author of the post believes that code quality is 30% talent and 70% simple environmental/behavioral setup. He describes those tools and techniques which are used by him to ensure the required quality.
  25. Progress tracker in PHP — the author wrote a simple library to track the progress of the big tasks execution such as batch processing and others. Besides time the library allows you to track the use of memory.
  26. Aspect-Oriented Framework for PHP — the post contains examples of AOP for PHP with the use of Go! library.
  27. C-based Web Frameworks for PHP — the author of the post discusses the pros and cons of using PHP frameworks, delivered in the form of extensions. The author mentions two of them: Phalcon and Yaf. Are there any other?

Do you have an awesome business idea? Let’s make it real!

Join our newsletter!

Get weekly updates of the top IT news delivered straight to your inbox

OFFER OF THE MONTH

Magento website development. Empower your online store!