Up And Close With PHP 7’s New RFCs

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, February 25, 2015

Follow me on Twitter as @mattiasgeniar

If you’re following the development of PHP 7, you’ll notice a lot of new RFCs (and some old ones that have been revived) are popping up again. How do you keep track of them and test their functionality?

The answer always used to be: compile PHP from the latest sources and test it yourself. But that’s not very handy, is it?

RFC Watch

Enter the PHP RFC Watch, a very cool side-project of Benjamin Eberlei.

php_rfc_watch

It keeps tracks of the difference PHP RFCs, who voted and what they actually voted. You can filter on the open RFCs at the right-hand side.

Testing new RFC functionality

The PHP community has been really fortunate to have a tool like 3v4l.org, that allows you to spin up a PHP/HHVM shell to test some PHP code – free of charge!.

And as of a few days, there is also support for RFC branches of PHP that you can test!

For instance, want to try out the new Scalar Type hints in PHP7? It includes the strict_mode option and you can test it out in an online shell!

<?php
declare(strict_types=1);
 
foo(); // strictly type-checked function call
 
function foobar() {
    foo(); // strictly type-checked function call
}
 
class baz {
    function foobar() {
        foo(); // strictly type-checked function call
    }
}

This is a really cool resource, I hope more RFC branches make their way to it.

Props to @3v4l_org!



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.