PHP News You May Have Missed – July 2014

A handful of news cropped up again that didn’t really get the attention they deserved, so I’ll use this opportunity to rehash some of them and explain others. The “news” here are usually less than brand new – instead, they’re bits of information you should pay attention to if you’re even the least bit interested in the PHP community and environment.

The Zend Rush

Zend, the company behind anything that has “Zend” in its name (Framework, Server, Studio, Engine…) has been very aggressive in product updates of late. They started the year off with a new release of their Zend Certification exam, continued with a huge update to the Zend Server, which we’ve covered in another post, and wrapped things up by updating Zend Studio to a new major version – it now goes to 11! We’ll be taking a more in-depth look at it in another post.

HHVM 3.2

Yet another version of HHVM is out – codenamed “Outkast”, this one introduces a bunch of bugfixes, more compatibility with popular packages and libraries, a switch to 5.6 as the PHP_VERSION (forward thinking much?), fastcgi_params are in $_SERVER, and so on. For a full changelog, you should see here.

For other HHVM articles of ours that take a slightly deeper look at things, see here and here.

PHPNG outperforms HHVM

While we’re on the topic of HHVM, we reported on PHPNG a while back – an attempt to speed up and optimize PHP internally and bring it closer to the speeds we’ve come to expect from alternative runtimes such as HHVM. It seems they’ve pushed the envelope even further than originally intended, as recent reports seem to indicate that in some cases, PHPNG now outperforms HHVM.

What’s in a Name?

A whole lot of wasted time and effort, it seems. There’s currently a fiery dispute raging on the PHP internals list about whether or not version 6 in the next edition of PHP should be skipped, in favor of calling it PHP 7 outright. The arguments for the latter include some rather nonsensical ones like “there’s no reason NOT to do it” or “some books with PHP 6 in the title exist out there”, but do read Phil Sturgeon’s take on it to grasp the full absurdity. All in all, I’m in full agreement with Phil on this one – just agree on something already and do it, enough time has been wasted on this debate, ultimately, it doesn’t matter one bit what it’s going to be called.

Killing PSR-0

As we’ve already mentioned Phil Sturgeon, allow me to pitch another article of his. In this one, he argues for the death of PSR-0, and wants everyone to start using PSR-4. We’ve described the difference in a past article, but do give his writeup a read and see for yourself why not upgrading immediately makes no sense.

PHP 5.6 Spec

The Facebook team is creating a PHP 5.6 language specification. A formal specification which allows anyone to understand, into great detail, how PHP works on the inside. This will allow for faster bugfixes, better alternative runtimes, higher quality extensions and, perhaps most importantly, will reduce ambiguity in various PHP pitfalls like type casting and such.

If you’d like to give it a more thorough read with some discussion on the topic, see the reddit thread – it contains a treasure trove of information and some down-to-earth explanations.

Interesting RFCs: Scalar Typehinting and PHPNG Merges

Interesting RFC #1 is a discussion on whether or not PHPNG should be moved into the master version of the upcoming 5.6, as the basis for the new version. See here and here. While I’m definitely up for life on the cutting edge, I don’t think the community is and we defintiely don’t need another double clawed hammer by implementing something that hasn’t really been tested at large. Having something that experimental in both stability and current extension support would be a very risky endeavor, and I would much rather PHPNG-enahnced PHP was a separate branch we could download and deploy, much like HHVM. Wait until PHP 6/7 to merge – there’s no rush.

Interesting RFC #2 deals with scalar typehinting and how best to implement it. It was originally authored by Anthony Ferrara, so you know it’s good – give it a read. Scalar type hinting is something the professional PHP community has been clamoring for for a long, long time, and something HHVM and Zephir give us by default, so it’s only natural the feature finds its way into the base of PHP as well.

The Community is Generous

We mentioned this in the last newsletter, but in case you missed it, it helped Joe Watkins out of a real pinch. Joe works on PHP internals and is in large part responsible for the functions you use every day when writing your PHP code. He’s the lead PHPDBG guy, he made pthreads, he maintains APCU and so much more – without him, PHP would look a whole lot different. He’s run into a bit of bad luck with his housing situation and asked the community for help – which responded generously. He raised the required amount in under 24 hours, and people keep donating still. If you’re feeling generous and want to thank him as a PHP developer who’s used the fruits of his labor, why don’t you chip in?

PHPLeague Google Group / Mailing List

The League now has a Google Group / Mailing list, so you can join it to get regular updates on cutting edge high quality approaches to solving common PHP problems. They’ll, of course, be focusing on League packages, but those are packages everyone should be using anyway, so go ahead and subscribe to get your daily updates.

PHP Common Mistakes

TopTal published a rather good post about common PHP mistakes, and we followed up with seven more. Together, the two posts discuss dangling array references, misunderstanding passing by reference vs passing by value, UTF8 issues and memory leaks, ignoring codings standards, using outdated extensions, suppressing errors, being too transparent with your app’s back end code, and much more. Give the two posts a read and see often you do these common mistakes.

Conclusion

That’s a wrap for this month. August should be much calmer, but September will be going wild with PHP conferences around the world, and you can be sure we’ll be covering quite a few of them. Do you think we missed any important news? Let us know in the comments below!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Rob Gott

    I always hated Phil Sturgeon, and couldn’t care less what he thinks. If he wants to kill PSR-0, whatever. If he wants to name the next version of PHP v6 or 7, who cares? His work on CodeIgniter was just wasted time. Fuel, LOL, whatever.

    • http://www.bitfalls.com/ Bruno Skvorc

      Wow. Hate’s a bit too strong of a word/emotion, don’t you think?

    • http://www.dev-metal.com/ Chris

      Why? He’s one of the most respected persons in the entire PHP world, and his work has changed the coding world. Letting the “PHP Superstars” decide over the future of PHP is a totally valid thing (and beside, he just gives his opinion, the final decisions are made in a democratic election). I’ll never understand these pointless hate-rants (without any arguments!) in comments.