DEV Community

Anders Björkland
Anders Björkland

Posted on

Happy PHP8 (4 Is Over)

Just the Gist
There has been 8 versions of PHP. The latest major release was just a year ago. The language has matured over the years and we have seen it getting more features, more performant and more stable.

A long and winding road?

We have had PHP in some form or the other available to the public since 1995. That is 26 years! A lot has happened with the language since it started out. In fact, Rasmus Lerdorf, the original creator of PHP, stated once: "I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." While this was how it started, and it can explain some of the quirks of the language, the evolution has continued in an organic but albeit a more controlled way later on.

The Timeline of Major Versions

Version 1: 1995

The embryo of the language - simple scripts.

Version 2: 1997

Database layer was added.

Version 3: 1998

The open source nature takes form. Zeev Suraski and Andi Gutmans becomes core developers.

Version 4: 2000

The Zend Engine is introduced. Superglobals see the light of day (V4.1).

Version 5: 2004

The object model is updated. Zend Engine is improved. PDO is a new and improved way to interact with the database layer. There's also namespaces, JSON-support, anonymous functions, and more. (In a way, PHP is now a modern language.)

Version 6: Never released

A version of PHP that was supposed to include native Unicode support. It was abandoned when there were difficults addind this support, and new features that were supposed to be added were instead introduced in minor version updates to version 5.

Version 7: 2015

Improvements to the Zend Engine. Null coalesce operator is now a thing. Return type declarations is supported and so is scalar type declarations. We have liftoff for the "spaceship" operator <=> , and much more. It's exciting!

Version 8: 2020

More performance improvements with another updated Zend Engine. Attributes are now supported (a native feature that functions as annotations). Named arguments make it easier to call functions. Match expression makes for a more precise and concise version of the switch statement. And again; so much more!

As we can see, there has been many improvements to the language since its inception. Performance, consistency, and stability are all improved. Who knows what will happen next?

What about you?

When did you start using PHP? What are some features that you miss? Are there some features that were an odd addition to the language? Comment below and let us know what you think ✍

Further Reading

Top comments (5)

Collapse
 
aschwin profile image
Aschwin Wesselius

I started using PHP in 1999, so I’ve seen the progress (PHP5) and stagnation (PHP6) from up close.

Also the different framework changed places in the competition many times.

I do love PHP but I don’t think it’s for all purposes equally fitting. Especially enterprise level implementation has certain requirements that are not easily met when using PHP.

Besides that, the SDLC gets expected to be shorter and shorter while the quality should improve too. Not easy to do and certainly not with PHP.

This brings me to the next point. PHP depends on open source support and thus the community of volunteers. The evolution of the language is thus depending on the speed, time and willingness of the volunteers to implement. On top of that decisions need to be made so someone needs to guide this process too. With PHP6 it was slow and almost deadly to PHP.

PHP is not the only language either. But for the future it needs to become a platform like JAVA or .NET to survive as a tool to accomplish things professionally.

I don’t say it’s dying. I only say it needs to step up and follow the direction the fore mentioned platforms are taking and help the developers not bothering with plumbing and the mundane things.

I can implement a solid REST API in ASP.NET in half an hour to do some CRUD. Yes, you can do so with Laravel but the quality differs too much to say the result is the same.

Point is, I love PHP but the first love is gone. It needs to mature fast(er) and cope with requirements we have today not 5 or 10 years ago. Building micro-services (the proper way) is undoable with PHP compared to .NET. There are so many plumbing elements to consider that don’t come out of the box in PHP.

Yes, .NET and JAVA have a steeper learning curve so for beginners it’s not easy or motivating to pick up. But to really build robust and secure applications PHP needs so many third party stuff from Composer instead of PHP delivering things by default.

Yes, .NET has NuGet and JAVA has Maven or what not. But the most simple dependable stuff for robustness and safety comes right out of the platform.

Collapse
 
andersbjorkland profile image
Anders Björkland

Great input, Aschwin! I've but recently opened my eyes to the collective effort that is PHP. Compared to Java or .NET it doesn't have a huge corporation backing it or taking the lead. We'll see what the recently announced foundation (a JetBrains initiative) can do to support the development of PHP, but I imagine it would be very difficult (impossible?) for it to compete on enterprise level performance and security with Java or C#/.NET.

Collapse
 
dawiddahl profile image
Dawid Dahl

Can I wish for a deeper strongly typed language system for Christmas? With support for generics and stuff!

Awesome series, Anders! Looking forward to you joining us at Kreationabyrån soon! 😃🙌🏻

Collapse
 
andersbjorkland profile image
Anders Björkland

No, there will be no generics. You haven't been nice enough! 😂

And thanks 😊 Yes, looking forward to it Dawid! I like to hear more about waves and DNA 😉

Collapse
 
dawiddahl profile image
Dawid Dahl

😄