Looking back, PHP has gone a long way from the early mostly procedural language to what it has become over the last few versions. Even now, many new features are being proposed, discussed, implemented and some rejected. This all leads to a more standardized language, instead of a jumble of snippet like helpers, classes, libraries etc. The PHP 7 timeline proposes changes that are likely to be implemented by the end of the year when the final PHP 7 release is expected to arrive. Personally, I am looking forward to it.

I will mention some of the nice features that will become available with PHP 7.

Most importantly, PHP 7 will bring in many bug fixes and strange behaviours that have been known to occur in previous versions, but those are just regular things everyone would expect after a long debugging process of major version release. The cute changes are the features, among which is a return type declaration.

The return type declaration means that a programmer writing a function or a class method can declare the return type of that function or method. It will help other programmers to know what to expect as a return value and how to handle it. More importantly, it will allow IDEs to better suggest and limit passing of unwanted argument types and in case of returning by reference, force the accepting variable to be of an appropriate type when it is time to accept a value.

There will also be some changes, which will make the variable syntax uniform, which might lead to some code being invalid in PHP 7, but are a small price to pay considering the benefits.

There is one thing I particularly like about the changes that will be shipping in with the new PHP version. The removal of ASP style tags and HTML style PHP language attributed tags. The later one I have never used and have never seen in use in any application I have come across. The ASP style tag I have had a chance to see and have quickly replaced them with regular PHP opening and closing tags before continuing to do any further work on the code. Therefore, for this change I am very glad. Personally, I would like to see the short opening tags removed as well, but that will not come with PHP 7, even though it is easily fixable in the INI file.

Oh, and there is one more thing. The session_start function will finally get arguments. These arguments will be passed as an array of options. Some of these options are the lazy write option which will, if set to true, have session data written to the session file or wherever you like to keep it only when actual changes have been made to session data. There is also a read only option. There is, however, an option caller unsafe lock, which will undoubtedly complicate the use of session a bit, but in general is an interesting feature.

Finally, there is an interesting new operator being introduced. Officially, it is called the combined comparison operator, but unofficially it was dubbed the Spaceship operator. It returns zero when both operands are equal, one when the one on the left is greater and negative one when the operand on the right is greater. It looks like this <=>.

Well, that would be all from me on this topic for now. Let us just wait and see when the real thing arrives. There will be ample time to evaluate new features and start making a PHP 8 wish list.