Live data from Hacker News

The new PHP

programming.oreilly.com

131–140 of 203 posts

Re: The new PHP

#131
Nothing in that article fixes the issues that make PHP unpalatable to me. They are all new features added to the current broken set. Even if they are new and shiny they don't make the rest of the language suddenly better.

Which is really kind of the problem with PHP. All of that broken stuff was allowed to be broken for so long that it's effectively impossible to fix it. All you can do is layer on more features.

Re: The new PHP

#132

It really pains me that there are so many utter misunderstandings about modern PHP from people that used it years ago and have no clue about the current landscape, even in this thread. Yes, the PHP core api is still a bit messy due to backward compatibility, but everything else it pretty awesome really. Please take a closer look if you haven't touched PHP in years, before you talk it down.

i think most of it has to come from Wordpress' dominance over PHP applications. and we all know how much of a mess that is.

Re: The new PHP

#133
> If you have bypassed PHP for alternative languages, or if you are a PHP veteran unaware of recent changes, you owe it to yourself to give PHP a second look.

I remember PHP as I would imagine one would remember child molestation and you're asking me to give him a call and apologize?

No.

Re: The new PHP

#134

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…

> The key flaw I find with PHP is with its community and lack of any mature frameworks.

The key flaw in the PHP community are people like you. People who still think that Codeigniter is THE PHP framework (it hasn't been for at least 3 years) yet still have the nerve to look down on newbie programmers.

The ignorance in your post is embarrassing.

Re: The new PHP

#135
PHP's "closures" are basically you the programmer calculating the free variables in an enclosed function and then telling PHP you want them to be bound in an environment. I would laugh if it weren't so pathetic.

Re: The new PHP

#136

Earlier quoted context omitted.

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 gen…

> I agree on the point of frameworks. I don't like any that exist so I made my own Rails-inspired one. With blackjack and hookers? Please say with blackjack and hookers.

Haha, thanks for making me laugh. This comment section is truly terrible.

Re: The new PHP

#137
post #26

While the gist behind this post is right, the article contains a number of factual errors. E.g. the version numbers in the "language features" section are pretty messed up: * Namespaces, closures and FPM were already in PHP 5.3 * The built-in web server was already in PHP 5.4 * Improved variadic functions, argument unpacking and phpdbg will be in PHP 5.6, which goes to beta in about a week.

Hi nikic. Thanks for the feedback! (I'm the author of that article). The O'Reilly editors made a few changes to the wording without my review that make it more ambiguous as to what features were introduced in what version. I agree as is it can be confusing. But the point is that the latest version of PHP provides all of these features. The variadic function statement was an error on my part and it has since been corr…

Do you really think tacking on more badly designed features makes PHP better? PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist, that is something a compiler should be doing. Google "closure conversion".

Re: The new PHP

#138

Earlier quoted context omitted.

Hi nikic. Thanks for the feedback! (I'm the author of that article). The O'Reilly editors made a few changes to the wording without my review that make it more ambiguous as to what features were introduced in what version. I agree as is it can be confusing. But the point is that the latest version of PHP provides all of these features. The variadic function statement was an error on my part and it has since been corr…

Do you really think tacking on more badly designed features makes PHP better? PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist, that is something a compiler should be doing. Google "closure conversion".

> PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist

Can you give an example? I googled "closure conversion" but didn't understand.

Re: The new PHP

#139
post #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?

Have you seen any WordPress code? There are a lot of "clueless devs" who stumble upon the most wretched, ill-advised features of PHP and happily (ab)use them.

I have been under the impression that that was, in fact, one of the reasons PHP has such a bad reputation (rightly or wrongly).

Re: The new PHP

#140
post #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.

Has PHP decided whether it's a language or a framework yet?

EDIT: To clarify, a framework like Rails definitely has a place for including a web server.

Now Ruby has a lightweight web servers in its standard library (but not its core library). Maybe the problem people are seeing with the web server (and it's not a new problem) is the way PHP's core library contains so many things that other languages would leave out as optional includes.

Post reply on HN