News Feed
Sections




News Archive
feed this:

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

PHPBuilder.com:
PHP Arrays Advanced Iteration and Manipulation
December 09, 2011 @ 12:50:11

In this new tutorial from PHPBuilder.com, Jason Gilmore shows you some of the more advanced things you can do with arrays in PHP (specifically in the areas of iterating through them and manipulating their contents).

Sporting more than 70 native array-related functions, PHP's array manipulation capabilities have long been one of the language's most attractive features. [...] There are however many array-related tasks which ask a bit more of the developer than merely knowing what part of the manual one needs to consult. Many such tasks require a somewhat more in-depth understanding of the native features, or are possible only when a bit of imagination is applied to the problem.

In his examples he shows how to do things like sorting a multi-dimensional array, iterating recursively (with the help of a RecursiveArrayIterator), converting an object to an array and doing "natural" sorting on an array's contents.

0 comments voice your opinion now!
array manipulation advanced iteration spl recursive sort


Eric Reis' Blog:
Why PHP won
January 20, 2009 @ 12:55:20

In a recent post to his blog Eric Reis talks about "why PHP won" in his web application development over other (web scripting) languages:

Some of them are probably still cursing my name, because - let's face it - PHP can be pretty painful. As a language, it's inelegant. Its object-orientation support is "much improved" - which is another way of saying it's been horrendous for a long time. Writing unit tests or mock objects in PHP is an exercise in constant frustration. And yet I keep returning to PHP as a development platform, as have most of my fellow startup CTOs. This post is about why.

He includes four things (that would be needed to counter the information cascade that PHP has) a "new challenger" language might need to burst PHP's bubble.

  • Speed of iteration (a good write/test/debug cycle)
  • Better mapping of outputs to inputs
  • A similar standard library
  • A better OOP implementation

He gets a bit confusing in there, moving back and forth between "PHP is good" and "PHP is bad" comments but he does come back to the one thing that everyone can agree on - regardless of your personal bias, you should always consider this: "it's all about picking the right tool for the job".

0 comments voice your opinion now!
opinion information cascade oop iteration standard library tool



Community Events





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


tool series security opinion language version framework interview release voicesoftheelephpant symfony introduction library podcast package composer update laravel community mvc

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