5 ms·
> I'm not that interested in programming, so I think it's a great language I think this sums up everyone I've met who actually likes PHP. They like that they a
by jcheng 15y ago
> I'm not that interested in programming, so I think it's a great language
I think this sums up everyone I've met who actually likes PHP. They like that they are able to get stuff done, and look no further. It is just frustrating to those of us who know that PHP is one of the most poorly designed (and I use that word loosely) languages ever to be successful.
If you can get over the local maximum of getting stuff done in PHP, the grass actually IS greener in Python and Ruby land.
- mst 15y agoRasmus basically said he doesn't care if he copies and pastes stuff around so long as it gives him the end result he wanted. The language reflects that. And, actually, it's NOT necessarily a bad thing to have a language oriented around people who don't actually care that much about programming when it's also oriented around people who want to ship something useful to an end user (who might care if it's insecure but doesn't care if the code's pretty). I've encountered a number of orgs now that have PHP on the front speaking XMLRPC or JSONRPC or whatever to a backend daemon (either Java or Perl in the cases I've seen) and since that means messiness on the front end shouldn't be able to violate business rules, it works out really well.
- jeltz 15y agoPHP is not much good for security though for beginner developers. It does not help with XSS, CSRF, or SQL injection prevention. If anything it does actually encourage them if you do not know of the risks.
- georgefox 15y agoI feel like this is more of a role for a framework built on top of PHP than for a language like PHP itself. PHP itself is pretty low-level. How would you suggest providing better protection against these? In the past, of course, PHP did have magic_quotes, which was a misguided attempt at mitigating SQL injections. This has since been removed, and there's been a big push in the direction of using prepared statements/parameterized queries through a library like PDO, which I think was introduced in PHP 5.
- jeltz 15y agoAgreed, about that this is the role of a framework and this is in many ways what is wrong about PHP. It tries to be both language and a framework with its built in templating. But templating which does not include simple to use support for escaping HTML is a really dangerous tool in the hands of a beginner. So was the (I believe now deprecated) mysql library they shipped and the tempting ease of string interpolation.
- georgefox 15y agoI don't know if this counts as meeting, but I consider myself a developer that is interested in programming, doing things right, etc., and I like PHP. I see PHP as a language comparable to English. Both languages have a bunch of inconsistencies, peculiar idiosyncrasies, a humongous base of speakers/users, etc. In both languages, a lot of what people write is not of high quality, but writing high-quality stuff is certainly possible. If I had to choose one language for the world to speak, it probably wouldn't be English, and if I had to choose one programming language to be used in a given field (say, server-side web development), it probably wouldn't be PHP. But given the reality of the situation, PHP, like English, is an incredibly useful language, and PHP code, like English writing, can be of very high quality. I think this makes it a very valuable language.
- jcheng 15y agoI agree that PHP is an incredibly useful language; that code written in PHP can be of very high quality; that PHP is a very valuable language (because every host supports it, and most popular content management systems must be extended using it). What I don't think it is, is a well-designed one. It could have been all of those other things, AND a well-designed one, it just wasn't. I think it's a shame if a generation of web programmers come of age thinking that the warts of PHP are inherent to all programming languages. (I myself once felt that way about ColdFusion, since it was the first language I learned and everyone I worked with also only knew ColdFusion.)
- jasonlotito 15y ago> I think this sums up everyone I've met who actually likes PHP. That says more about the people you associate with then with the language. The people I know care about programming, care about doing it well, care about elegant solutions, and care about a wonderful end product. What they don't care about are stupid language wars. > the grass actually IS greener in Python and Ruby land. I never got serious with Ruby, so I'll confess, I might be missing something. But, going by what I see in Destroy All Software's screencasts, I don't feel like I'm missing anything. I can't help it, but ever since Rails came on the scene, I can't help but feel like the PHP people that make up the PHP community has dramatically improved. This, of course, is purely based on the people I've met.
- Osiris 15y ago> The people I know care about programming, care about doing it well, care about elegant solutions, and care about a wonderful end product. What they don't care about are stupid language wars. I was just thinking this same thing. My background is mostly in PHP, C#, and more recently JavaScript. Each of these languages is completely different from each other, but I haven't gotten to point where I curse the fact that one program is written in one language versus the other. Each language has it features and pitfalls, but as long as you can accomplish the task you've set out on, I'm not sure that it really matters. For example, I absolutely love the ease of passing functions around in JavaScript, but you can also make a real stinkin' pile if you don't structure things right. Having used JavaScript, I find myself thinking about using delegates and anonymous functions a lot more in C# than I did before because I've seen the benefit of them in JS. You can't tell a good programmer by their choice in language but in how they leverage that language to make awesome software.
- jcheng 15y agoOK, how about I rephrase to: > I've never seriously learned a second language, so I think it's a great language Do the people you know have experience with other comparable* languages, and still think PHP is a well-designed language and platform? I concede that the PHP community, and PHP itself, has dramatically improved in the last few years. PHP 5 is a revelation compared to PHP 4. [*] i.e. not "The other language I know is C, and I love that PHP is so high level!"