DEV Community

Discussion on: The Snobby Demonization of PHP

Collapse
 
tomfern profile image
Tomas Fernandez

On my first internship they put me to write PHP, which I had never encountered before. Also, it was my first time doing web development. I think I learned the language in record time and did a passable job. I don't think I could have done with any other language at the time. PHP was pretty intuitive and easy to use. Whatever purist may say, PHP will always have a place in my heart.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

I've been through "the good times and the bad" with PHP. It was the first web-based language I ever learned. And as someone who programs almost exclusively in the web realm, it kinda holds a place in my heart akin to my first love. When I first started using it (in the late 90s), you basically had two choices for web development - PHP or Perl. I'm sure I woulda done just fine learning Perl. But instead, I got on the PHP train, so my biases are set.

I'll freely admit that PHP's earned many of the arrows that are slung its way. 3.x was... embryonic. 4.x was a mess. 5.x was like watching a massive team of dike engineers working to improve the structure - but previous neglect was so great that they could barely keep ahead of the leaks.

FWIW, I think 7.x is actually... pretty damn good. I literally enjoy coding in 7.x. However, I'm rarely tempted to actually write much in PHP anymore because almost all my development has shifted to JS, which I can do for frontend (React) or backend (Node).

Still... I have WAMP installed on my local machine and there are numerous times when I go back to tinkering with PHP scripts.

Collapse
 
matronator profile image
Matronator

I'd be interested to read your opinion about PHP 8.x. Care to share?

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis

The first major caveat here is that, while I wrote gobs of PHP code for more than twenty years, it's only in the last several years that it's finally fallen almost entirely out of my toolbox. In general, I just don't have much use anymore for server-side scripting - in any language. So I can't claim to have written a single line of PHP 8.x code.

That being said, the list of new features added in the 8.x releases is... awesome. For example, if you look at the 8.x release page, almost every one of those features is, IMHO, a MASSIVE improvement, and they would make the language far more viable if I have the need again to reach for a server-side scripting language.

Thread Thread
 
matronator profile image
Matronator

Ah, I see, that's a shame. Or probably not, but you know what I mean 😅.

My experience with PHP 8 has been amazing, it's really on the right track to being considered a "worthy" backend language with the likes of C# etc (or at least Go or Python). One thing that still kinda brings it down are the messy built-in functions with inconsistent naming and parameter ordering that are kept unchanged to not majorly break backwards compatibility. I hope they would decide to finally sort it out some day, but I'm afraid that day will never come.

But definitely when you are ever in need of some server-side coding and have the opportunity, give it a try. It's almost a whole new language now from what it was back in 5.x and you'll be pleasantly surprised 😉

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis

Absolutely. Honestly, 7.x was a quantum leap in itself. And I greatly preferred using 7.x over any of it's predecessors. But yeah, 8.x looks to be even better - by leaps and bounds.