PHP Digest: Memory Leak in PHP, Multy-Language Support in CodeIgniter, PHP Podcasts and Much More!
News and Releases:
Traditionally on April Fools' Day internet was shaking from side to side because of the various stunning news. And the world of PHP was not an exception. Thus, Yii2 so long-awaited by many users is going to migrate from PHP to Ruby. Rather productive PHP-framework Phalcon written in C, will be rewritten in Assembler. In addition, PHP-FIG group was forced to admit that the decision to use indents instead of tabs was completely wrong, and this time the tabs won! And of course, the most important news was that the PHP project team finally decided to release PHP 6.0 instead of 5.5.
- PHP 5.5 beta2 released — a little earlier than it was planned before the next PHP beta was released. So there is a true chance to see a stable release not later than this spring. The release contains several bug fixes. The full list of changes is here.
- April's issue of Web & PHP Magazine — the latest issue covers the following topics: Modern Client-Side Component Development, Do you want to be a PHP Evangelist?, Did you know PHP is Evil? and others.
- Zend Framework 1 is moving to Git! — the code of the framework is transferred to GitHub. Zend Framework 1 is just under support now and is going to be suspended max in a year and a half. Pull Requests are submitted only for fixing. But doesn't it mean that ZF1 forking is planned in the nearest future?
- PHP's comparison operators are quite strange — the previous issue contains the response of Nikita Popov on StackOverflow concerning the working details of foreach. This time Nikita answers a question about comparison operators in PHP. For example, PHP's == operator is not reflexive, i.e. $a == $a is not always true.
- Help! A memory leak in PHP! — great slides by Julien Pauli, a core-developer and release manager of PHP 5.5. A lot of useful information on PHP internals.
- Predicting random numbers in PHP it's easier than you think! — a nice post that tells us in detail how to generate random values in PHP while these values are not always so random as it may seem at first glance.
- PHP is meant to die — in the post, the author states that PHP was not developed for long uninterrupted performance. The script is supposed to perform its task and to die soon. That's why nobody took care about memory leaks and other well-known problems in PHP.
Digests don't cover PHP podcasts usually, but the release of a new podcast from Zend gave us grounds to make a review of all existing and relevant podcasts.
- /dev/hell — a web development podcast created by the well-known Grumpy Programmer - the author of the famous PHPUnit Cookbook.
- PHP Town Hall — the podcast is created by two active developers from CodeIgniter and Laravel communities - Ben Edmunds and Phil Sturgeon, the creator of PyroCMS and a participant of PHP-FIG. To record a podcast, they invite well-known personality from the PHP-community and discuss relevant topics.
- Lately in PHP Podcast — a video podcast authored by Manuel Lemos, the creator of PHP Classes. The latest news from PHP world is discussed in a video chat with other PHP leaders.
- PHP Podcast — the new podcast from Zend, created by Joe Stagner. The first issue contains a talk to Cal Evans as well as discussion concerning the further development of PHP-community.
- A first look at React — React is nothing more than the implementation of the Reactor pattern in PHP. The library allows developers to create asynchronous event-based applications a-la Node.js. See more information in the excellent video report by the library creator. Besides, there are a few more examples of simple applications in videos on the React in Action official channel.
- Distributed applications in PHP with Apache Zookeeper — a great introductory tutorial on using ZooKeeper. The author demonstrates the work of the distributed application with a simple example.
- Taming Slim 2.0 — a large and detailed tutorial on one of the recently appeared numerous PHP-micro-frameworks.
- Meet Boris: a better REPL for PHP — Boris is an advanced interactive programming environment in comparison to built-in PHP one, access to which can be obtained with the PHP-a call. The link leads to a small tutorial, which covers the installation, Boris library configurations as well as an example of its use in another application.
- Apache2 vs Nginx for PHP application — the author completed some tests of Apache2 and Nginx when maintaining PHP-applications. Three types of the applications were used for testing: a large application on Zend Framework 1, a small PHP script and WordPress. The result is quite expected: Nginx is much faster for static resources, but when generating new pages using PHP - the difference is not significant.
- On empty return values — the author of the post declares the rule: "If your function returns a collection, its null value return must also be a collection" or in general, "return type must remain the same" arguing in favor of this rule in the post.
- Round Table: the use of exceptions — the post represents a discussion of the topic by several developers. Each provides his arguments and examples. An interesting format and a lot of interesting ideas.
- PHP is not dead — in the post, the author talks about how things have changed in the world of PHP since 2007. At that time, PHP4 was the most popular one while PHP5 was installed on less than 20% of the servers, despite the fact that it was a bit more than 2 years old! Logarithmic scale of PHP trend clearly shows how the situation has improved since Jan 2002 as well as other stats indexes on the use of PHP in general.
- Sending mail using PHP and Amazon SES on Centos/AWS Linux — a small tutorial on how to use Amazon SES from PHP.
- PHP 5.5 Preview: new password hashing API — this API was already much written about, but nevertheless there is one more post with an overview of the added features. But note that if you are not going to use PHP 5.5 soon, you can use the compatibility library password_compat.
- Multi-language support in CodeIgniter — a small tutorial on how to internationalize an application written in CodeIgniter.
- Code Coverage with Behat — to talk about code coverage in case of Behat is not quite appropriate, since not any specific sections of the code are under testing, but the behavior of the application itself. However, information on the code coverage can be useful before legacy code refactoring. The post shows how to get such information with Behat and PHP_CodeCoverage.
- Object Oriented Programming in PHP — a large and very detailed tutorial on the basic concepts of object-oriented programming in PHP. It can be very useful for beginners.
- Security in Web Development & modern PHP frameworks — in the post, the author provides an overview of changes in security accepted over the past two years, namely the releases of ZF2 and Symfony2.
- Zend Framework 2 forms – simple and available everywhere — a detailed tutorial on how to use the forms from ZF2.
- Web console on PHP — a small tool that may be often useful.
- How to screw up professionally — a useful tip on how to behave if you make a mistake: confess your fault, apologize for it and fix it.
- Creating a Poll application in a quarter of an hour with Phalcon — a good screencast for those who want to try Phalcon.
- Thinking Sphinx — a Ruby interlink between Sphinx and ActiveRecord.
- Programming with Anthony - how to become a good developer — having slightly changed the format, one of the core developers of PHP Anthony Ferrara continues his series of videos about programming. In this clip, he answers the question of what should be done to improve your skills and become a great developer. Since it is impossible to know everything, in his opinion, it is better to learn to understand new features quickly than to remember them. The rest of the videos is here.
- My first Symfony project — a good post, in which the author shares his experiences with the framework, and provides beginners with useful tips.
- Judy-arrays in PHP — the data structure that needs significantly less memory in comparison to the built-in PHP implementation of arrays, and therefore suitable for handling substantially more amount of data.
- Good design is no excuse for wasting time — the author believes that Symfony2, in spite of its great architecture, is not a RAD-framework, unlike Yii, CodeIgniter, CakePHP. According to him the use of Symfony2 in 80% of all tasks means just a waste of time when implementing rather simple things. But fortunately, there is a good solution: KnpRadBundle.
Read our web development and
business optimization guides
Compare in-house offshore
software developer payroll costs
Check the available resources for
a quick project start
Join our newsletter!
Get weekly updates of the top IT news delivered straight to your inbox