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.

The Lesser Known Contributors Who Are Trying To Make PHP Good Again

56 pointsby DanielNover 12 years ago

14 comments

adaml_623over 12 years ago
Article title seems to imply there will be some info about the people who programmed these new features... instead there's a rehash of the new features and mention of a library or 2 that we could read about elsewhere.<p>Author says, "the developers of these new tools deserve some serious recognition for the work they are doing" and then totally fails to mention them!<p>So now we've again been suckered into the 'PHP good' vs 'PHP bad' non-debate.
error54over 12 years ago
While I've bashed PHP as much next guy, these are the facts:<p>-Take away PHP and the internet would break. The vast majority of websites are either written in PHP or have a PHP back end.<p>-The LAMP/LNMP stack is by far one of the most deployed web server configuration.<p>-PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web.<p>PHP is the Model T of web languages: people love to laugh at it because it's old and ugly but it nearly single-handedly revolutionized the landscape. I for one applaud any efforts to revive and improve this language.
评论 #4606177 未加载
评论 #4605961 未加载
评论 #4606079 未加载
评论 #4610965 未加载
ericclemmonsover 12 years ago
Time to beat this dead horse again!<p>PHP as a language isn't great, since it has been around the block in a volatile environment (the web) and shows lack of foresight in language design.<p>However, PHP is experiencing a renascence with modular components, frameworks and tools utilizing established design patterns, and an overall boost in contribution and collaboration in the open-source community, in large part thanks to Github.<p>PHP is not dead, and vibrant communities around Symfony and Doctrine are pushing it forward considerably.<p>In my opinion, large applications can and have been built primarily on PHP while leveraging other languages and tools for their strengths.
评论 #4606157 未加载
评论 #4605860 未加载
mseebachover 12 years ago
PHP was never good, but it abstracted away some basic web specifics -- as opposed to CGI/Perl that required you to care about protocol details such as starting output with two newlines -- and hit a sweet spot infrastructurewise -- dead easy to get started with, dead easy to get hosted for next to nothing -- that gave it enough traction to grow very quickly.
评论 #4606925 未加载
acabalover 12 years ago
Those are all nice, but as a long-time PHP dev, the only way to make PHP truly better is to do a Python-style hard version bump. Rip off the band-aid, so to speak. Create an entirely new, consistent, object- or namespace-oriented standard library to replace the mess that exists now. The majority could just be wrappers for existing code, which is fine but just inconsistently named and parameterized. Then fix the terrible namespacing implementation, consolidate the jumble of operators (::, -&#62;, ., +, etc.), add some syntactic sugar to objects (getters and setters?), add native Unicode support, and call it all PHP X or something.<p>There's much to be said for backwards compatibility, and PHP does that really well; but there's also much to be said for a new generation built with the mistakes of the past in mind.<p>I actually really like PHP despite its flaws. It gives the programmer easy, deep control over HTTP output, it's easy to install on new servers, it's easy to deploy (no compilation, just rsync everything!), it has decent built-in templating (if you can learn the quirks), it's OSS, it has rich libraries, rich documentation, and a rich community. But it's also deeply flawed and it deserves a break from the past.<p>My ideal sort of web language would be something with C# syntax and libraries but with PHP-style OSS-ness, simplicity in output and compilation, and expressiveness in HTML. That would be nice!
zdwover 12 years ago
Everyone probably knows this, but PHP's Smarty template engine (<a href="http://www.smarty.net" rel="nofollow">http://www.smarty.net</a>) is really awesome.<p>I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in.<p>I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.
评论 #4606109 未加载
评论 #4606070 未加载
评论 #4606005 未加载
评论 #4606281 未加载
评论 #4606148 未加载
评论 #4605943 未加载
评论 #4606305 未加载
jrockwayover 12 years ago
So does PHP not let you mock things by actually writing classes in the test file, like:<p><pre><code> class FakeFooBar(FooBar): def my_method(self, *args): self.last_my_method_args = args return self.result class TestFooBar(TestCase): def test_my_method(self): foobar = FakeFooBar() foobar.result = 42 self.assertEquals( foobar.use_my_method('hello world'), 'forty two') self.assertEquals( foobar.last_my_method_args, ['hello world']) </code></pre> This is more verbose than mocking things out, but the control flow is more obvious and you don't have to rewrite the entire test case every time you change one tiny implementation detail (which is what I've had to do with every mox test I've ever written).<p>Actually, it's not even that verbose compared to mox :)
评论 #4606724 未加载
jeyover 12 years ago
When was PHP good in the past? (Honest question; I don't use PHP.)
评论 #4606128 未加载
评论 #4605825 未加载
languagehackerover 12 years ago
Those examples aren't good differentiators between PHPUnit and Phake. And unfortunately, despite how goot Composer it, it just adds another package management system into the mix. GitHub has ended up being the best package manager PHP could really ask for.<p>I kind of view the native PHP development server as getting featural parity with Rails and Django. But it seems like that's a major gripe for developers who are averse to working with Apache or Nginx for being too complex.<p>I'm very excited for traits as a feature. This is when we get into real language features other, more prestigious or "hot" web development languages actually have that PHP lacks. These result in true architectural deficiencies requiring annoying hacks to accommodate.<p>In the end, PHP itself benefits most from expanding its capacities as a logical formalism. Tools are great, but they're also a lot less easier to get right.
luneticsover 12 years ago
You shouldn't forget about PSR-0 / <a href="http://www.php-fig.org/" rel="nofollow">http://www.php-fig.org/</a>
评论 #4606166 未加载
TamDenholmover 12 years ago
To all the language bashers, can we all agree that a good developer beats a bad developer in any language?<p>I wrote a post on this: <a href="http://news.ycombinator.com/item?id=4606961" rel="nofollow">http://news.ycombinator.com/item?id=4606961</a>
jentulmanover 12 years ago
composer is great, I'd just like to add that the docs make the distinction that it's a dependency manager rather than a package manager.
eik3_deover 12 years ago
Serious question: Do you know of successful/large web startups in the last two years that used PHP as their main language?
评论 #4606734 未加载
评论 #4606920 未加载
gubatronover 12 years ago
Again?