Hacker News new | ask | show | jobs
by cutler 2159 days ago
In many ways I preferred PHP4. Can't stand all the pseudo-Java in PHP5+.
1 comments

You can still (mostly) code in PHP4 style and ignore all the new cruft and syntactic sugar they added over the years. And you get the performance boost of 7.x for "free".
Yes, I suppose what really worries me about the "Modern PHP" movement how it looks down on anything that isn't Java-style OO. Procedural PHP is now considered to be some kind of unwashed Cinderella. I cringe when I look at a typical PSR-compliant page of PHP with its K&R braces, blank lines between each line of code and fanfold doc comments. You're lucky if you get more than a handful of lines of business logic on a screen.
I never learned Java until late in my career (when I learned up on Android). I started as an EE, and my programming has been primarily self-taught.

PHP is a kind of crappy OO language, but it is sufficient. I think Java is a better language, for OO. PHP 7+ is lot better than it was, before 5.

A lot of Java programmers came out of school, and started to create PHP chimeras. I feel as if that results in unnecessarily complex code. Things are complex enough, without applying UI-style MVC to server backend systems.

I wrote PHP for around twenty years, starting off procedural and mixed into HTML pages, to OO-based pure PHP systems.

I stopped a couple of years ago. This was my final PHP project[0][1]. It was sort of a "dissertation." No one is actually interested in using it, but it was developed in order to practice my architectural skills. It's a pretty intense system.

[0] https://riftvalleysoftware.com/work/open-source-projects/#ba...

[1] https://github.com/RiftValleySoftware/basalt/tree/master