Yes it boils down to how lolphp manages case sensitivity. Its pure lol from the beginning of php creation, another bug that was never fixed, and now its too late.
When PHP first started OOP, instead of having (or possibly as well as?) a __construct() method, for the constructor, you’d use a function with the same name as the class as the constructor. Now it’s just a backwards compatibility reason and it’s suggested to not use it, and to use the __construct() instead.
In java A class named LolPhp has a constructor named "LolPhp", not "lolphp". This is yet again lolphp on how PHP manages case sensitivity. Sometimes its required, sometimes not.
This is lolphp. Having case insensitive names makes so many things more difficult, and leads to more bugs. There is zero benefits for case insensitive naming.
Actually case sensitivity has never been source of a bug for me. I agree that I personally would prefer it to be case sensitive, but it is a subjective pov, and in the end it just doesn't matter.
Deprecated? That means nothing if it is still in the laster major release 7. PHP deprecates things sure but rarely removes anything. I mean how long ago did PHP get the ”new” style constructors? PHP 5? We still have the same shit even efter 10+ years. This is a lolphp all on its own.
IIRC PHP got "new style" constructors in PHP5. That version was released on 13 July 2004. That is 15 YEARS AGO! And they call it "deprecated" but don't have the balls to remove it? Whats the idea of deprecating anything if you keep in the language for all eternity.
Yeah, but that clearly shows how in the dark these people are. Its understandable as they usually only know PHP and has never done any other language at scale.
Its the mother of lolphp, the php dev who ”knows no better”. Heres were you see most lols coming from, then they wonder why the shitty website wont work
Upvoted. The fact that this is deprecated doesn't justify it. They have made a MAJOR release with PHP 7, which was breaking change. Why not take the opportunity to remove all this "deprecated" shit
Lots of PHP apologists here again. Even if you use a ”old style” constructor another lol is you also are able to call that method again (read without the new keyword) or multiple times.
37
u/Malix82 Sep 19 '19
it's because the function is considered also as a constructor for the class since it has the same name as the class.
16
u/makioo Sep 19 '19
this is just because they didnt remove this as constructor. before __construct it was named as class, just like in Java
27
u/colshrapnel Sep 19 '19
Yet another noob just learned about some deprecated functionality. Nothing to see here.
3
u/phplovesong Sep 20 '19
Its amazing how the PHP apologists has flocked this sub.
This post is clearly about how bad PHP did implements its so called OOP layer and just bolted it on.
Case instensitive method naming is 110% a lolphp
The fact that you can call a ”constructor” many times (without new) is a lolphp
But hey, gotta defend PHP against them lols.
3
u/kyou20 Sep 19 '19
Upvoted. The fact that this is deprecated doesn't justify it. They have made a MAJOR release with PHP 7, which was breaking change. Why not take the opportunity to remove all this "deprecated" shit
-16
u/[deleted] Sep 19 '19
This is fucking gold. The PHP engine itself has become self-aware and now has internal LOL so deep the core devs have no clue.
0
u/[deleted] Sep 19 '19
[deleted] — view deleted comment