There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
This is embarrassing, but I had no idea that 0 == "string1" would return true. I had to write a test script to verify it.
Ask HN: Why no love for PHP?
101–110 of 150 posts
Re: Ask HN: Why no love for PHP?
#102Earlier quoted context omitted.
Great argument, nice analogy, makes a lot of sense, and I completely (and respectfully) disagree. Your analogy reminds me of the greatest cook ever, my grandmother. She used no technology whatsoever. All of her tools had been her mother's which were probably manufactured in the 1800s. She chopped everything by hand in a wooden bowl. (If anyone else helped her with the chopping, everyone at dinner could tell.) She nev…
I don't think your story is incompatible with my analogy, in fact I think it's totally in-line with my analogy. Many hobbyists who have reached the utmost peak level in their art go totally primitive. Cooks grow their own food. Carpenters make hand-made furniture, people really serious about clothes go bespoke. Just because we spend more time agonizing over things doesn't mean we have to spend more money on them. Mor…
Re: Ask HN: Why no love for PHP?
#103There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
I can't say I love PHP, but some of your criticisms are a little silly. For example, about typing... your argument is that when you cast a string to an int, it returns 0. What would you have it return, null? Typing is jank in a number of ways, but in most cases I See the logic in the original decision. To a noice, the idea that false == "false" (because "false" casts to 0) but true != "true" just seems broken. But wh…
I wouldn't have it return anything. I'd have it throw an exception (type error). Dynamic typing can be a Good Thing. Pretending types don't exist is probably a mistake.
PHP uses the backslash for escaping characters in strings and for line continuation. There's ambiguity being created any way you look at it.
Many languages much older than PHP seem much more modern. Scheme, Smalltalk, Haskell, Python and even Perl come to mind.
Re: Ask HN: Why no love for PHP?
#104People who are really good at their jobs obsess about their tools- artists obsess over their paint, carpenters obsess over their power tools, cooks obsess over their knives. PHP is like buying a chef's knife at Wal-Mart. You can create a 5 star dish with it, it cuts perfectly fine, but it doesn't inspire the same passion that a Shun knife does. Most restaurants in fact, don't use fancy-knives, they use just regular k…
Actually a lot of top artists don't. Not only because paint isn't their medium but because they don't do the work themselves. They have the ideas and then they employ minions to do the actually work of making the piece. Personally I think that makes them less than an artist, but they're the ones selling work for 100s of thousands of £s
F'real.
Re: Ask HN: Why no love for PHP?
#105Everybody knows about it, but nobody talks about it.
Re: Ask HN: Why no love for PHP?
#106Earlier quoted context omitted.
I agree with more or less with what you said but a downside of PHP is not security vulnerabilities, that's really just a myth. I can't remember the last vulnerability which could be directly attributed to PHP as a language. Sure, there are plenty of apps containing holes but those are not caused by PHP but by not coding correctly, eg not checking input making SQL injections possible etc. Which might confirm what you…
Languages are like tools: buying a the best set you can afford is the best possible start to a project. PHP doesn't cause SQL injection flaws, but it doesn't make it any easier. How many escape functions are there ? Shall we count them ? ---------- mysql_escape_string() - Escapes a string for use in a mysql_query mysql_real_escape_string() - Escapes special characters in a string for use in a SQL statement mysqli_rea…
http://dev.mysql.com/doc/refman/5.1/en/mysql-escape-string.h...
Re: Ask HN: Why no love for PHP?
#107There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
Bit harsh. People are not idiots because they haven't studied computer science and don't know their algos from their elbows.
PHP is easy for quick and dirty - primarily business doesn't care how dirty the code is provided it's done quickly and the crashes don't hurt the bottom line too much.
Re: Ask HN: Why no love for PHP?
#108There are lots of reasons. * PHP attracts idiots. Partly that's because you don't need to know anything to make simple PHP. So, in the large pool of PHP programmers, there are a ton of idiots. And those idiots produce a lot of verbose code that gets used because it does something. Ruby, Python, Perl, etc. all put up a larger barrier because they don't just come with a session handler or whatnot built in. And that wee…
Well said. The thing that bothered me the most when I forced myself to use it was that it seemed like a high-school language hack tried to rewrite perl and got some of his buddies to help. Each of these guys hacked in their own versions of standard functions ad-hoc, and they each chose their own naming convention (e.g., strcmp vs str_replace). There is no uniformity in the language. Elegance is completely lacking. If…
Re: Ask HN: Why no love for PHP?
#109Earlier quoted context omitted.
Glad to be your unintentional hammer. Dane Cook is a comedian who hit it BIG, in part, due to MySpace. He's been in a couple of movies, including "Employee of the Month." He's got millions of fans, but also a sizeable group of haters, inlcuding many of his fellow comedians. He's just another in a series of people or items that hit it big, leaving many of us wondering why.
Could it be that he's hated because he steals material?