4 ms·
Here's an idea.. If PHP is so bad.. Don't use it. Simple as that. Let the people who want to use it... There's absolutely very minimal things wrong with the lan
by Killswitch 14y ago
Here's an idea.. If PHP is so bad.. Don't use it. Simple as that. Let the people who want to use it... There's absolutely very minimal things wrong with the language. Everyone's quick to compare it with Python or Rails or something else saying "PHP does this wrong that Python does right" well, if PHP did everything the same way as Python, Rails, or something else, when what makes it different? Who wants to use a language that doesn't have some severe difference?
It's annoying seeing people waste their breath on arguing why PHP is so bad... Especially when many people/companies have proven PHP is good and can be scaled and used on high trafficked sites, yet 90% of the arguments are how it doesn't scale.
Just because you have used Wordpress or built a quit todo app in PHP that took you 5 minutes and that's the extent of your usage with the language, doesn't make OR break the language.
Quit complaining and let PHP users use PHP, and you continue using whatever the language you use is.
Signed,
A Python, PHP, and Node.js developer.
- lucperkins 14y agoNice to see PHP get some love from polyglots!
- Killswitch 14y agoThanks, I am also an App/PHPfog user too. ;)
- lucperkins 14y agoThen double freaking high five :)
- ralph 14y agoPHP has all the beauty of Perl with none of the power. I think part of the reason folks pillory PHP is their annoyance that people are using it as their first language and may never move beyond it to the better alternatives available.
- getsat 14y ago> There's absolutely very minimal things wrong with the language. I guess you missed this post that highlights a few of them: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de... I agree on using what you enjoy using, but implying PHP isn't riddled with flaws is absurd.
- Killswitch 14y agoJust like Python, Perl, Rails, Node.js, and any other language out there. Why all the hate towards PHP?
- djur 14y ago"Rails" isn't a language, and PHP has fundamental design flaws that those other languages don't have. It's not that it has flaws, it's that it has unavoidable flaws.
- Killswitch 14y agoEvery language has flaws, may not be the same, but they still do... I am sure I can go dig up enough flaws in Python to write an article totalling 960 words on why it's so crappy too... But I am not, because it's dumb to nit pick at one language just because YOU don't like to use it.
- Mikushi 14y agoIt's something I find interesting. PHP "haters" keep pointing at flaws, yet in almost 10years of doing PHP, the only thing that really ever annoyed me is the string and array parameters order... And I've done a wide range of thing in PHP, including scaling websites to millions of pageviews per day. PHP might have design flaw, but in the end, they don't matter because they actually don't affect the day to day developer. And I've tried my hands at Ruby, Python (still use it but more for scripting than web dev), C# (was actually my first language for webdev), and weirdly enough I find that they get in the way more that PHP does when it comes to building websites.
- andolanra 14y agoSome of the problems with PHP are things that are problematic or irritating to development (e.g. its inconsistent standard library) but other things are actively dangerous to security and correctness. For example, in PHP, '9223372036854775807' == '9223372036854775808' returns true.[1] Now imagine those two strings are hashed passwords. The overall problem is not with specific flaws of PHP; the problem is that flaws in a language lead to errors in programs written with that language, and when that languages is used to write some kind of web infrastructure, then use of that language by people less than experts (i.e. almost everyone) is harmful to the whole internet. PHP can be used to write useful, scalable, secure web apps in the hands of someone who knows what they're doing, but in the hands of someone who doesn't quite know what they're doing, or who does but is tired enough to miss individual details of their code, it is much more dangerous than other comparable languages. That is why I discourage the use of PHP if possible. [1]: https://bugs.php.net/bug.php?id=54547 https://bugs.php.net/bug.php?id=54547 (Both strings appear numeric, so they are casted to numbers before the comparison, but because they are larger than maxint, they are rounded down. The solution, if you really must use PHP, is to use === instead. The fact that a solution exists does not mitigate my concern.)
- lucperkins 14y agoAgreed on what you said about writing scalable, secure web apps. No question about it. But I should say as an aside (and you wouldn't necessarily disagree, I don't think) that these kinds of problems are not exclusive to PHP. JavaScript gets you exactly the same result. And try doing something as simple as 0.2 + 0.1 in JavaScript. Oy vey...
- Killswitch 14y agoBlame the developer not the language...
- phibit 14y agophp > var_dump('9223372036854775807' == '9223372036854775808'); bool(true) This made me cry.
- Killswitch 14y ago