37 karma · joined August 24, 2016
[1] https://en.wikipedia.org/wiki/Human_echolocation#Ben_Underwo...
- it is not "input" must be treated, but, so to say - output. It's the destination that matters, not the source. By the time you get the input, you have no idea how and where it will be used. You can tell it right before the output (or, rather, better to call it "use") only. Say, you've got some input that didn't pass the verification and you will have to display it back in the HTML form. And if you already "escaped" it for SQL, it will be malformed. And vice-versa. Moreover, any data must be formatted properly before use, not just something that you tagged as "input".
- the word treated above is for a reason. Because the term "escaping" suggests some certain routine in PHP, which is the actual reason for numerous SQL injections.
And I visit my facebook account weekly, via desktop browser, only to see what's up with my friends hanging up there.
I very seldom do likes, as I know that my likes could show up in my friends' feeds. There are NO notifications from social network or media on my phone. I call it "information hygiene".
And yes, like others mentioned, I've got A LOT of spare time for books, hobbies, movies etc.
So, it's apparently a good reason to hate, but by no means a reason not to use PHP.
The front page for Teams boasts it's better than your "stale wikis and lost emails" but in reality there are much more stale answers on SO than anywhere else.
I love writing documentation too, but from years participating on Stack Overflow I found it most unreliable for the purpose. As I once quipped, "Imagine Wikipedia where there are several hundred articles on the New York city. And one that Google links first is copy-pasted from Encyclopedia Britannica, 1913. And every single day several kids from elementary school start a new one."
SO is torn between essentially ambiguous goals, providing fast on-site answers and being a reusable knowledge base. And it's good with the latter only because of Google. Without Google it will be no better than fast on-site answers on Slack.
Also I fail to see how answers on SO for Teams are supposed to be less "stale" than your old wiki articles.
For me, at least our corporate wiki is more organized, without duplicates, whereas Stack Overflow's modus operandi is largely relies on creating thousands of duplicated questions.
Instead you started nitpicking on the solution. That's dishonest. And it makes the discussion endless.
> Third, nobody does it.
This statement of yours clearly states that you have no idea of the actual PHP ecosystem. Every single major PHP framework is routinely doing it.
Honestly, you are claiming that all these people are dumb and lazy. I respect some snobbery but apparently not up to that point.
set_error_handler("myErrorHandler"); function myErrorHandler($errno, $errstr, $errfile, $errline) { throw new Exception($errstr, $errno); }
Is all you need.
They are functions - yes. If your first language was fully OOP, then probably PHP is not your language of choice. It doesn't make it bad, though.
Consistent error handling is a matter of one set_error_handler() call.
Ok, undeed PHP can be called inconsistent, if one would have a fancy to. And this opinion could be even defended with numerous examples... which examples, for some reason, do not work neither for learners who prefer PHP over "more consistent languages", nor professional developers, who just get their job done.
To boil it down, I think this "inconsistency" argument works more for the internet discussion than for the real life consideration.
May be your hate is entirely from the fact that you are forced to work with the tool you don't like.
Come on, if a handful inconsistent function names is all the problem with PHP to you, let me suggest you to get yourself a good IDE with a code completion feature. You'll forget that "broken stdlib" forever... of course if your aim is to get the job jone, not to slander a language you aren't working with.
You see, that's a hater's logic.
Every PHP's advantage or eviddence you've given, you are trying to dismiss or even twist, calling it a disadvantage - usual tricks for the internet discussion when you aren't interested to find the truth but just to keep pressing with your opinion.
Honestly, this kind of discussion is the only problem with PHP.
Besides, real world evidence is against your theoritical musings.
1. Search up Internet for the existing tutorials. 2. Plagiarize the content. 3. When caught, rewrite several sentences to make it look slightly different and hard to google. 4. When asked to remove the plagiarized content, make an innocent look and say "It's not me, it's the author! I can't do anything."
My tutorial has been plagiarized on this site, thus such a bitterness. But nevertheless it's a fact that all tutorials that published on the site at the moment are just compilations of plagiarized content.
You can browse this site ( https://www.google.com/search?q=site:w3clan.com ), pick a random tutorial and google for a sentence taken from any chapter. And you will see the original source. The technology behind this site is mostly cheating.