Answer the question
In order to leave comments, you need to log in
What did you take from php7 for yourself?
Hello.
Share your experience with those who have been working with php for a long time, love it and follow new releases - what impressed you and fell into the treasury of useful tricks?
I was waiting for type hinting, naively hoping that with the advent of it, php would become stricter and there would be no more jokes about '1' + 2, but apart from specifying the return data type in functions and the type of method arguments, I didn’t get anything (yes, php is not compiled language, but I would like to at least notice when operations with different types or the ability to turn off automatic casting).
The new operator <=> - also did not seem to improve life very much, a little tidied up exceptions, multiple use, etc.
At interviews, they often ask questions about the differences between versions 5 and 7, and apart from performance and enumeration of syntactic sugar, I can’t really answer anything, because everything good that I use (oop, traits, namespace, exceptions, pdo) is also in previous version.
Maybe I didn’t learn the basics well and there are a lot of useful things in version 7?
Thank you.
Answer the question
In order to leave comments, you need to log in
* scalar type hinting
* return type hinting
* ??
* \Throwable
* Nullable
IMHO PHP's current direction is not more about new features, but less ways to shoot yourself in the foot (if you look at the list of everything that was thrown out or deprecated in 7.0 - 7.2). In more and more cases, PHP leaves only one way to do something and gives you fewer and fewer ways to do who knows what. For me personally, this is much nicer than a bag of syntactic sugar, which was added (or not added) in the next version. Yet PHP is more often criticized for being too forgiving and dragging a load of not the most successful solutions from the past, and not for the lack of features. And often not without reason.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question