TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What PHP Needs

42 pointsby davidcoallieralmost 14 years ago

12 comments

gibersonalmost 14 years ago
PHP needs a champion, a Douglas Crockford and book entitled "PHP: The good parts".<p>PHP faces a lot of similar discrimination that JavaScript did for the longest time. Sure, there are still criticisms for JavaScript but for the most part people have settled and realized that to make JavaScript good you have to write good code. Which is exactly the case for PHP.<p>The trendiness of PHP bashing exasperates the actual issues of PHP which can easily be abated with good practices.<p>We need a call for someone to get up and preach the best practices of PHP. And with that, a call for PHP Lint based on those best practices. There are a few individual attempts at providing JS Lint type analysis for PHP files but nothing from anyone with clout. We could use an official analyzer supported by recognized field leaders pushing quality coding practices.
评论 #2689851 未加载
评论 #2689689 未加载
评论 #2689617 未加载
sigzeroalmost 14 years ago
PHP to me is a hodge podge of ideas all thrown together with no real engineering sense behind them. That might be just how I feel though.
评论 #2689323 未加载
评论 #2689287 未加载
angermanalmost 14 years ago
Just an Idea. I think what causes so many sentiments against PHP is due in part to the mass adoption of PHP.<p>These days, you find PHP almost everywhere. And how do you get to PHP? Let's assume we are in collage and want to write that next big website that's surely going to rule them all.<p>Now, we don't really know that much about all this "tech" stuff. But hey, I can hit "show source" in the browser. This must be easy. After a few baby steps with a WYSIWY(WishYoud)G tool, you decide to learn /some/ HTML for good. Once you figure that HTML alone can't do a lot, there's a somewhat native path to PHP.<p>You keep on reading tutorials written by others, who know as much as you or a little more. You are still on the cheap side, and need to keep tight on your money for that next big website you are going to write.<p>And the more you read the more enlightened you feel. Wow! I can actually do that and my dead cheap webhost offers PHP as well. Life is good.<p>Because you don't lack any minimal intelligence, you figure out how to write your next (big) website. You probably didn't succeed in writing the next FaceBook, but hey, you are now /one/ of the /web guys/. You probably think what you are doing is real fun.<p>There are then two paths you can take: - A: stick with PHP and feel enlightened all the way, when ever you learn some new trick, or - B: wonder if PHP is the only true real thing. You don't know C or some other "ancient" language, so you are still a little afraid. Perl seems to look a lot like PHP but it's syntax is confusing and no one of your friends on the forums you are frequenting is using it anyway. Then there is Python or Ruby. Wow those look strange. No curly braces for function bodies. Why do people here talk about templating? What's this about? Do I need that? PHP was so easy... Anyway, you are still curious and learn about this "other" way of writing webapps (that's what we are still primarily concerned with). Once you start to figure out that variables do /not/ have to start with $ to be valid, you wonder what else PHP might have hid from your novice learning? There is a lot more. Not necessarily PHP's fault. Just the lockin in that PHP mindset.<p>----<p>The basic problem with PHP (to me) is that I've seen it to be more a motel on the way to enlightenment. Some just find it too comforting to move on. Others, once they've passed it, rarely(ever?) come back unless someone else tells (forces) them to do so.
leftnodealmost 14 years ago
I almost posted a new Hacker News story, but I saw this and figured my blog post belongs here better. It's an old post I dug it.<p><a href="http://leftnode.com/entry/what-php-needs-to-change" rel="nofollow">http://leftnode.com/entry/what-php-needs-to-change</a>
评论 #2689826 未加载
ivanbernatalmost 14 years ago
I'd be happy if we moved to "+" for string concatenation and "." for object member access (but this would break every script out there). Though I've been a PHP user for 5+ years, I still do this when switching back from longer JS / Ruby development periods.
skrebbelalmost 14 years ago
Why the hell does this site need to be able to read my Twitter direct messages for me to be able to cast a vote?
评论 #2689197 未加载
评论 #2689150 未加载
citricsquidalmost 14 years ago
"What PHP really needs is: Strong leadership and an official process to submit new ideas, extensions", "New blood, and less old blood.", "A plan for the future of web development".<p>PHP is an opensource project: volunteer!
评论 #2689077 未加载
评论 #2689920 未加载
wccrawfordalmost 14 years ago
I'm disappointed in the people who put disparaging comments in as ideas, and the people who voted them up.<p>This was an attempt to generate awareness and that kind of behavior doesn't help anything.
评论 #2689609 未加载
jessedhillonalmost 14 years ago
WARNING: Frank opinions ahead.<p>I added "To die", because that's my honest opinion after having been a PHP dev since ~PHP3. Whether it's the language's fault or not, my experience with other people's PHP code is that anything big tends toward spaghetti except in a few well-engineered cases. Non-pasta is the exception that proves the rule.<p>People who actually know something about programming well, frankly, would not start new projects in PHP. Its only use to me is as a litmus test -- if your answer to "What do you think of PHP" doesn't include a significant critique of the language, I probably wouldn't like working with you. (Nor you with me)
评论 #2689543 未加载
评论 #2689777 未加载
noduermealmost 14 years ago
This is ridiculous. It's like saying hammers should include screwdrivers. Just know your toolbox and you won't have a problem.<p>PHP is great. What's with all the hate? It's a good tool for a certain kind of job, not the right tool for others. Big deal. There isn't a single language that you can't find bones to pick with. It's all about what you do with it and how you like to code. If you're comfortable writing server-side script in brainfuck, more power to you.
评论 #2689644 未加载
mehlahalmost 14 years ago
Love!
cschiewekalmost 14 years ago
A final nail in it's coffin.