News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DZone.com:
Writing clean code in PHP 5.4
February 23, 2012 @ 12:08:18

With the first stable release of PHP 5.4 not too far off, it's important to understand the new features it offers and how to use them effectively. In this new post to DZone.com Giorgio Sironi shows how to "write clean code" with these new features, including a few snippets of code to illustrate.

After seven release candidates, it's clear PHP 5.4 is coming: as always the improvements from the previous minor version are many. [...] Let's look at the new features and score them on two metrics: usefulness, and potential for abuse. I'll try to avoid discussing non-language related matters.

He starts by pointing out some of the "gotchas" that can happen with traits (like errors thrown when more than one method is named the same and that they are a separate hierarchy), the short syntax and dereferencing support for arrays, closure binding, upload progress and more. For each of them he gives two measurements - the usefulness of the feature and the potential for abuse.

0 comments voice your opinion now!
clean code upcoming features usefulness abuse


blog comments powered by Disqus

Similar Posts

NetTuts.com: What to Expect From PHP 5.5

Michael Kimsal's Blog: New antipattern? "Multi Master Data"

PHPClasses.org: PHP 5.4 Features: Shall you Upgrade to the newer PHP Version?

NetTuts.com: How to Write Code That Embraces Change

The Nerdery: Is my code compatible with PHP 5.4 or 5.5?


Community Events





Don't see your event here?
Let us know!


series conference composer version introduction podcast laravel library language interview security list artisanfiles opinion tool symfony release voicesoftheelephpant framework community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework