The Standard PHP Library: Worse gets better

Share this article

It’s always amusing to read the remarks of those brought to the boil by PHP, the all-time classic being a toss up between this;

PHP is a big ball of crud. The only reason it doesn’t appear to stink at first is due to the five layers of band-aid it is wrapped in.

and this

Dear Rasmus,

I want you to know that I have checked out your “open source project”, and I feel it necessary to inform you that even though you hide behind the guise of “open source”, what you produce is total crap.

Of course such remarks are often provoked by considering things like PHP’s arrays and miss the point the sorting a data structure in PHP typically looks like this;


$sql = "SELECT * FROM users ORDER BY name DESC";

It also ignores things PHP most definately does right, such as ease of deployment: “look Mom – no XML descriptors!”.

Have brought this up before with the notion that worse is better. Taking note again of what Jeff was pointing to here;

Over time, people pay more attention to software written in the New Jersey style, so it improves faster. Worse becomes better.

Looking at what Marcus Boerger has done so far with the Standard PHP Library, for me it’s cool water: worse getting better.

The big question now is what else should the SPL be doing?

Believe Marcus is open to ideas and suggestions (and of course direct help if you’re able) and input does make a difference, such as this discussion which lead to the initial implementation of Iterator::hasMore() being renamed to Iterator::valid().

Best place to get talking is the internals list.

Harry FuecksHarry Fuecks
View Author

Harry Fuecks is the Engineering Project Lead at Tamedia and formerly the Head of Engineering at Squirro. He is a data-driven facilitator, leader, coach and specializes in line management, hiring software engineers, analytics, mobile, and marketing. Harry also enjoys writing and you can read his articles on SitePoint and Medium.

Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week