Live data from Hacker News

The new PHP

programming.oreilly.com

1–10 of 203 posts

Re: The new PHP

#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 decided to launch and run their site with it?

Re: The new PHP

#3
I sometimes ponder what I'd fix, given the chance, about PHP:

* Make the "stdout == response body" an explicit option, and make a rendering engine the default instead. Just sending all output is a senseless DEFAULT.

* Remove all the array_x functions and turn arrays into a class instead, and change the parameter order to be consistent across all the functions. A similar action could be done across many other classes of functions, too.

* Tighten equivalence requirements, == should work like ===.

* Etc.

But I always realize I'd just end up with Ruby or Python, both of which already exist and have fantastic ecosystems. Oh well.

Re: The new PHP

#4
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…

What makes you think a "clueless" dev is going to find out there's a built-in web server in the first place?

Re: The new PHP

#5
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…

The web server is explicitly for development purposes. It is not meant for production.

> It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place.

This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off.

Just because a tool can be misused is not an argument against it nor its inclusion.

Re: The new PHP

#6

I sometimes ponder what I'd fix, given the chance, about PHP: * Make the "stdout == response body" an explicit option, and make a rendering engine the default instead. Just sending all output is a senseless DEFAULT. * Remove all the array_x functions and turn arrays into a class instead, and change the parameter order to be consistent across all the functions. A similar action could be done across many other classes…

> == should work like ===

Then why not use === ?

Re: The new PHP

#7
post #5
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…

The web server is explicitly for development purposes. It is not meant for production. > It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place. This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off. Just because a tool can be misused is not an argument ag…

This. Can't agree more.

Re: The new PHP

#8
post #6

I sometimes ponder what I'd fix, given the chance, about PHP: * Make the "stdout == response body" an explicit option, and make a rendering engine the default instead. Just sending all output is a senseless DEFAULT. * Remove all the array_x functions and turn arrays into a class instead, and change the parameter order to be consistent across all the functions. A similar action could be done across many other classes…

> == should work like === Then why not use === ?

I know enough to use === when I program in PHP (even though I oftentimes forget) but newbies don't.

Re: The new PHP

#9
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…

Isn't that pretty much what people use with rails? No one says that is overkill.

Re: The new PHP

#10
This may be of interest to some: I did research and found out that 58 out of 67 web hosts in Finland either offer PHP 5.4 or 5.5 right now or at least starting from summer 2014 (5.3 EOL is in July). An increasing number of web hosts give their customers the ability to switch PHP versions (with .htaccess or some web interface). It seems this trend will speed up the installation of fresh PHP versions.
Post reply on HN