Live data from Hacker News

The new PHP

programming.oreilly.com

81–90 of 203 posts

Re: The new PHP

#81
post #60
post #16

Earlier quoted context omitted.

Just because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a seco…

I don't hear people complaining about Python's builtin webserver. Maybe thats because Python only attracts people who do things correctly right?

Python's stdlib webserver is terrible and not to be used. You WILL hear Python people say this

I don't see why you decided to pick a fight about Python, though - Python seems to be a sore point for PHP defenders and I really don't know why

Re: The new PHP

#82
post #2

> It contains powerful new features and helpful developer tools, such as a built-in web server I haven't finished the article yet, but really? Is that what PHP needs? A built-in web server? It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place. How long until we start having security releases for the PHP web server, because so many clueless devs decid…

Having a built-in web server was a tremendous boon for Ruby on Rails. Anybody could run "rails new foo; cd foo; rails server" and run code without installing Apache and mod_whatever.

Regardless of what anybody thinks about Ruby developers, I've never heard or seen that "people launching production sites with servers intended mainly for Rails development use" is/was a widespread thing.

Re: The new PHP

#83
Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Codeigniter, only has inline test functions for any kind of testing and doesn't even come with a auth library.

Being a PHP developer myself, I can't refute that only selling point of PHP, albeit, a major one, is its so "easy" to get things done. I feel in the near future, with advent of tools to make mature frameworks more accessible, PHP would cease to be a tool for any serious web development.

Re: The new PHP

#84
post #68

Earlier quoted context omitted.

Facebook, blogs and open source enterprise CMS would disagree with you.

Facebook doesn't even use PHP anymore, they switch to their own implementation of PHP called Hack to runs on HHVM. So no, they don't use PHP per se for anything this days. http://www.infoq.com/interviews/adams-php-facebook

They're very much using PHP (the language) ...they just made their own runtime. They still sit down and write PHP. They don't sit down and write HHVM code.

That's like saying a company no longer uses Ruby because they use JRuby now.

Re: The new PHP

#85

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

Why isn't that the most important selling point of most languages?

The cases where PHP is not appropriate seems to often be known before going into it (with notable exceptions like Facebook of course) but thats a success problem not a fundamental problem with PHP.

In 95% of the cases PHP seems to be exactly the best possible, easiest to get up and running, versatile for web based programming.

Re: The new PHP

#86
post #39

I don't get it. Why people can't just admit the fact that PHP had his time and now, no one with common sense would not start new project (except simple wordpress stuff) in PHP.

In most enterprise environments, you have your choice between .NET and PHP. Given the option, I'll take PHP, thanks.

Wrong. You have a choice between .NET and Java.

Re: The new PHP

#87
post #69
post #21

Earlier quoted context omitted.

No its like saying Home Depot shouldn't sell power tools to children who don't know how to safely use them. Unless the web server displays a huge red message every time it is run saying "Don't even think about using this in production" you can bet that it will be.

> Unless the web server displays a huge red message every time it is run Uhh... this is the first line the web server spits out: PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011 The manual isn't exactly vague on this point either: http://us3.php.net/manual/en/features.commandline.webserver.... So we got the warning already in there, what else would you like?

20 words of that manual were dedicated to letting people know its not for use in production. Un-highlighted and buried at the end of a paragraph that I initially skimmed over and didn't even read. No attention is directed at it in any way.

So the server outputs a message. Great. Is it huge, red and says "do not use me in production"? No. Its a standard version banner.

Re: The new PHP

#88
post #68

Earlier quoted context omitted.

Facebook, blogs and open source enterprise CMS would disagree with you.

Facebook doesn't even use PHP anymore, they switch to their own implementation of PHP called Hack to runs on HHVM. So no, they don't use PHP per se for anything this days. http://www.infoq.com/interviews/adams-php-facebook

In the video on that page he specifically says that if you're writing software at Facebook you're probably doing it in PHP or C++.

Re: The new PHP

#89

Earlier quoted context omitted.

It's a weird problem. A 6 major release may be the only time to do such things, and people here think it would be a disaster. I don't know if it's possible at all to retrofit language improvements into the stdlib.. do you write a parallel one or do you write books hoping people will catch on the latest way to write good code ?

Yeah, that's a huge issue with Perl 6. The language is nowhere near backwards-compatible with Perl 5, and it can't be easily retrofitted to be. So perl 6 is basically becoming its own language in parallel rather than the successor as was originally planned. It will be interesting to see if PHP goes that route or not.

PHP already kinda did that once, for the PHP6 effort, which was abandoned after many years of being in development. So it's probably not the way to go.

Re: The new PHP

#90

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

I agree on the point of frameworks. I don't like any that exist so I made my own Rails-inspired one. Unfortunately this means I prefer not to do consulting jobs in PHP because it's considered bad practice to use a framework that no one else knows.

(Mine has dynamic ORM (reads db schema), a console (REPL that loads project config and autoloader file), and similar project layout. Recently added REST API system that generates MD and HTML documentation at /path/to/project/help/.)

Anyway, I would say the main selling point is ubiquity. Every cheap host I've seen people (clients and semi-technical friends) use supports PHP. It often takes more work to get a Ruby project running on those hosts. Or worse for a Node project.

Post reply on HN