PHP Digest: Functional Programming, Password Hashing in PHP, LUCID and Much More

January 29, 2013

A digest of the most recent news from the PHP world. Take a look at the latest updates, releases and training materials!

News and Releases:

  1. PHP 5.4.11 and PHP 5.3.21 Releases — The releases include mostly bug fixes, the full list of changes you can see here.
  2. Laravel 4 Beta 1 — it has been written a lot about the fourth version of the framework, and the first beta has finally been released. The documentation is here and the code is here.
  3. PHP 5.5.0 Alpha4 released — PHP development team has announced the release of the fourth alpha version of PHP 5.5. The release includes bug fixes and a couple of new features, such as obtaining the Class Name with the “class” keyword (ClassName :: class), see details here, also DateTimeImmutable class has been added. A full list of changes can be found here. This is the last alpha release of PHP 5.5 — betas are now being developed and the first one is expected on February 7. Beta versions won't have any new features, so at the moment we can confidently imagine how PHP 5.5 will look like. As for Accessors, we won't see any of them.

PHP:

  1. Functional programming in PHP — An excellent post that describes the state of functional paradigm implementation in PHP. An example of calculating total cost in a shopping cart is provided in a functional style.
  2. Traits: Good or Bad? — It has been written a lot about about Traits. There is one more article describing the advantages and disadvantages of the new feature of PHP.
  3. Why 2013 is the Year of PHP? — The previous year was definitely successful and productive for PHP, and in this post, the author tells about the challenges PHP developers have faced and makes predictions for 2013.
  4. Parsing and evaluating PHP in Haskell, 2 — A very interesting experiment described by the author in two posts. The key moments of development are described in details: PHP code parsing is discussed in Part 1 and the actual evaluation — in Part 2. The code of the developed tool is available on Github.

Training Materials:

    1. Websockets, ratchet, silex and redis pubsub implementation — A small, but interesting post about creating a real-time web service, which can be used via websockets. The author had a task to implement some backend for iOS app, and the obvious solution seemed to create a REST service, but this solution had some drawbacks. As a result, the author has implemented a simple tool for processing requests via websockets with Ratchet, Redis and Silex. Code and demo.
    2. PSR? — A good post with the review of all PSR standards. There was much of criticism against PSR, especially after PSR-3 release, however there are enough posts in its defense, such as this one, and especially this one.
    3. Autoload path depth insanity — in the post the author shares his thoughts about the PSR-0 standard and, considering Composer emergence, tells about the necessity of making changes to the standard. A list of proposals is attached to the post.
    4. Mediators - Programming With Anthony — An active leader of PHP community Anthony Ferrara continues to share his videos about programming. In the latest video he talks about the Mediator design pattern. More videos are available here.
 
  1. Five Clues That Your API isn't RESTful — Although REST is not a panacea in cases of building API, but if you do implement RESTful service, then do it correctly.
  2. Node.js for PHP programmers2, 3, 4 — If you are a PHP developer, but you're thinking about getting engaged in something else, pay attention to Node.js. In a set of articles the author writes about the basic principles of development in Node.js and provides some examples of implementation of the same things in Node.js and PHP, which is especially useful.
  3. MongoDB's aggregation framework — In version 2.2 the aggregation framework, which provides powerful and flexible abilities to solve the problems of data aggregation, was presented in MongoDB. The post is an introduction to aggregation framework with examples in PHP.
  4. Better Workflow in PHP With Composer, Namespacing, and PHPUnit — A video tutorial on how to use these effective tools. If you are not doing so yet, then it's time to start.
  5. Getting Ahead In Security By Watching The Neighbours — The news about a critical vulnerability in Ruby On Rails (detailed analysis) discovered not so long ago, made the author to write this post. After some investigation, the author discovered a similar vulnerability in YAML parser in Symfony. Although the bug has been fixed, no one can ever be sufficiently warned, so the author asks to be vigilant and monitor the detected bugs carefully, not only in the tools you use, but also in their analogues.
  6. LUCID — A series of articles about the development on LUCID principles: L - Logging, U - Unit Testing, C - Configurability, I - Isolation, D - Documenting.
  7. Lithium: Getting Stuff From Your Database — A small article which describes work with database in the Lithium framework.
  8. Implementing PSR-3 with log4php — The tutorial on how to implement the recently adopted standard with the excellent logging tool from Apache.
  9. Password Hashing In PHP — Repetition is the mother of learning. Another guide on safe password hashing. And here is a tutorial on using Zend \ Crypt of ZF2 to solve the same problem.
  10. Zend Framework 2 Event Manager — A good guide to start working with Event Manager in ZF2. First the author provides an overview of the main principles: design pattern Observer, event-oriented programming. Then he mentions the specific examples on how to use the event manager.
  11. Google's Two-Factor Auth - Online or Offline — a small post on the implementation of two-factor authentication using GAuth library.
  12. Steganoflage: A New Image Steganography Algorithm — the project describes the implementation of steganographic algorithm to hide the information directly in the image.
  13. Using PHP Data Objects — A detailed tutorial on PDO. If you are still using Mysql extension, then it's time to forget about it and start using modern interfaces to access databases.

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!