Live data from Hacker News

PHP 7.2.0 Released

php.net

21–30 of 80 posts

Re: PHP 7.2.0 Released

#21
post #10

What is PHP like nowadays? I know it has a bad reputation and a history of kitchen sink design but have they managed to tame it into something more sensible? Do the docs help steer developers away from legacy issues and common bad patterns? Would anyone recommend it for new projects?

> What is PHP like nowadays? Would anyone recommend it for new projects? It is not bad at all but since there are so many good/better alternatives I would never start a fresh project with PHP nowadays. The only reason would be if you have a team with PHP experts - then PHP would be the obvious choice.

I don't know whether the alternatives are objectively better, except maybe in certain domains.

Mostly, people seem not to like PHP because they find it ugly and awkward... which is valid, but subjective. The major alternatives (JS, Ruby and Python) have documentation, frameworks and reasonably comprehensible paths to an MVP, although one could argue that PHP is still slightly better in terms of speed of deployment. Everything seems to have converged and normalized to the point that the factors affecting one's choices primarily have less to do with the language itself and more to do with the ability to hire for it, and whether or not you like significant whitespace.

Re: PHP 7.2.0 Released

#22
post #21

Earlier quoted context omitted.

> What is PHP like nowadays? Would anyone recommend it for new projects? It is not bad at all but since there are so many good/better alternatives I would never start a fresh project with PHP nowadays. The only reason would be if you have a team with PHP experts - then PHP would be the obvious choice.

I don't know whether the alternatives are objectively better, except maybe in certain domains. Mostly, people seem not to like PHP because they find it ugly and awkward... which is valid, but subjective. The major alternatives (JS, Ruby and Python) have documentation, frameworks and reasonably comprehensible paths to an MVP, although one could argue that PHP is still slightly better in terms of speed of deployment. E…

> The major alternatives (JS, Ruby and Python)

I strongly disagree with this statement. 10 years ago this would be correct, but as you said yourself the tooling is so normalised that pretty much everything is an alternative to PHP.

Re: PHP 7.2.0 Released

#23
post #2

Literally only object as new typehint, not the classname of the object? This doesn't really help much. https://wiki.php.net/rfc/object-typehint Looks like they went back into perl-mode

You can already type name your classes and even primitive type.

You don't have only "object".

Re: PHP 7.2.0 Released

#24
post #10

What is PHP like nowadays? I know it has a bad reputation and a history of kitchen sink design but have they managed to tame it into something more sensible? Do the docs help steer developers away from legacy issues and common bad patterns? Would anyone recommend it for new projects?

Currently I'M coding on Zend Framework 1 under PHP 7.2, it's definitely more pleasant than PHP5.anything.

The docs don't help a lot in my experience, common sense goes a far way though; always use type hints, always use classes, wrap any PHP native functionality up if it has nasty stuff.

If you want to create a new project you can use PHP, it's usually not a bad choice if you want to use a cheap shared host or want to integrate with wordpress or similar.

That said, if you plan anything complicated I severely recommend picking literally anything else (sans Node.js, with which I have other axes to bury)

Re: PHP 7.2.0 Released

#26
post #10

What is PHP like nowadays? I know it has a bad reputation and a history of kitchen sink design but have they managed to tame it into something more sensible? Do the docs help steer developers away from legacy issues and common bad patterns? Would anyone recommend it for new projects?

[deleted]

Re: PHP 7.2.0 Released

#27
post #21

Earlier quoted context omitted.

> What is PHP like nowadays? Would anyone recommend it for new projects? It is not bad at all but since there are so many good/better alternatives I would never start a fresh project with PHP nowadays. The only reason would be if you have a team with PHP experts - then PHP would be the obvious choice.

I don't know whether the alternatives are objectively better, except maybe in certain domains. Mostly, people seem not to like PHP because they find it ugly and awkward... which is valid, but subjective. The major alternatives (JS, Ruby and Python) have documentation, frameworks and reasonably comprehensible paths to an MVP, although one could argue that PHP is still slightly better in terms of speed of deployment. E…

> although one could argue that PHP is still slightly better in terms of speed of deployment

It takes less than a minute to deploy apps on heroku/whatever. Deployment speed is not really a relevant factor now, everything is fast.

Re: PHP 7.2.0 Released

#28
I use Hack now (I work for Facebook) and i kinda like it, at least in comparison to any untyped languages.

So, serious question... Is there really any reason to use PHP over Have?

Re: PHP 7.2.0 Released

#29
post #28

I use Hack now (I work for Facebook) and i kinda like it, at least in comparison to any untyped languages. So, serious question... Is there really any reason to use PHP over Have?

Ubiquity? Easy installs?

Re: PHP 7.2.0 Released

#30
post #28

I use Hack now (I work for Facebook) and i kinda like it, at least in comparison to any untyped languages. So, serious question... Is there really any reason to use PHP over Have?

I like Hack as well, although just as a hobbyist, but it doesn't seem to have gotten a lot of traction. Hosting options appear limited, and support for HHVM seems to be decreasing, rather than increasing. Many developers seem hesitant to use anything tied to Facebook after the React patent license controversy.

Hack's biggest success thus far seems to be serving as a wakeup call to PHP itself. What it needs as a language is some version of PHP's ubiquitous hosting infrastructure, preferably one that supports calling Composer with HHVM and allows XHP as well, and actually gets updated and maintained (I'm looking at you Openshift.)

Post reply on HN