Modern PHP is basically a different language than the horrors of php 3-4.
It has:
traits
pattern matching
named parameters (so you never have to pass in a null anywhere just to skip a parameter in a function that someone else defined)
references (like smart pointers so you can pass by reference instead of value, but it prevents you from seeing the actual memory address to stop people trying to do math on pointers and ending up with bugs)
SensitiveParameter (a way to make a value as this needs to be hidden for security purposes, so attackers can’t leak passwords in stack traces by causing crashes)
etc…
That said, there’s still some remnants of the horrors…
Its god awful API.
Example, if you wanted to do something with a string, you can’t type the string then . and see a list of functions/methods to use on it. Nor can you call a general String. and see autocompleted things. No, instead every single method that is used for string manipulation has a different name that doesn’t include the word string at all. And the names are completely inconsistent. You just have to memorise an entire textbook of invocations to do the one simple thing you want to do.
You can get professional help for that these days!
Modern PHP is basically a different language than the horrors of php 3-4.
It has:
That said, there’s still some remnants of the horrors…
.and see a list of functions/methods to use on it. Nor can you call a generalString.and see autocompleted things. No, instead every single method that is used for string manipulation has a different name that doesn’t include the word string at all. And the names are completely inconsistent. You just have to memorise an entire textbook of invocations to do the one simple thing you want to do.Professional Help for Programmers
Partial Hospitalization Program
I would check myself in if I started writing either, for sure.