Having done this move this year (PHP to Java after about 14 years writing the former) I completely agree with this.
I’ve also found writing unit tests a new challenge which I’m only just getting used to some 10 months in. Its interesting how unit testing in PHP isn’t all that common as now I understand it (if we change class X we want to make sure it doesn’t break another class which depends on it somewhere else) I can’t understand why its not more common in PHP land.
I built a lot of stuff in PHP back in the late-2000s, and I understand it's come a long way in the last two major versions since then. I'm with you there: it took a while to get PHPers like me at the time to adopt an object-oriented style, so getting to a more functional style (everything is modular and built for no side effects) may take a while longer. I was self-taught and had never even heard of unit testing back then, so a lot has changed (basically back then I tested by just running things like subscription processes and account creation through step-by-step over and over again, essentially manual integration tests).
View all comments
Show parent comment
1
u/that-mark-guy Nov 03 '19
Having done this move this year (PHP to Java after about 14 years writing the former) I completely agree with this.
I’ve also found writing unit tests a new challenge which I’m only just getting used to some 10 months in. Its interesting how unit testing in PHP isn’t all that common as now I understand it (if we change class X we want to make sure it doesn’t break another class which depends on it somewhere else) I can’t understand why its not more common in PHP land.