Live data from Hacker News

PHP 8: Before and After

stitcher.io

41–50 of 346 posts

Re: PHP 8: Before and After

#41

Seriously, enough with PHP. Can we just let it die? I worked with PHP 5.6 years ago and I hated it. Recently I worked with PHP 7. Heard about all the work that's been done on it and I was kinda excited to try it. It's still so broken. It doesn't matter if they improve performance or add new cool features. PHP is broken in ways that can't be fixed without breaking compatibility. Fork it or put it out of its pain.

The day you reach perfection is the day you finish your project as in never... PHP works (thought not perfect) lets me get things done.

Lots of languages work and let you get things done. You don't have to choose PHP.

Re: PHP 8: Before and After

#42
post #26

Seriously, enough with PHP. Can we just let it die? I worked with PHP 5.6 years ago and I hated it. Recently I worked with PHP 7. Heard about all the work that's been done on it and I was kinda excited to try it. It's still so broken. It doesn't matter if they improve performance or add new cool features. PHP is broken in ways that can't be fixed without breaking compatibility. Fork it or put it out of its pain.

This is such a shallow elitist comment. A lot of the common criticisms levied at PHP have been corrected years ago, and PHP is responsible for hundreds of billions of dollars of turnover globally. Of the top 10 websites in the world, PHP is partially or wholly powering more than half of them. Wikipedia, Wordpress, online retail. I have personally created 6 figures of value because I could quickly dump some PHP script…

One of our acquisitions was one guy with no real background in tech working over a few years in his spare time and turning a project into a multi-million dollar business competing well against other entries in the market put together by teams of a dozen or more actual developers with millions in VC funding.

And that was a project originally targeting PHP 4 and, by the time I was brought on, had made it all the way up to 5.x.

I mean, yeah, the code is garbage, but if he weren't allowed to write garbage code _he just wouldn't have written the code at all_. If that guy had to sit and learn proper paradigms and server administration and a bunch of other stuff, he would have just gone out and done something else instead.

Yeah, PHP lets you write shitty code (though it also lets you write _good_ code...). But in lowering the barrier to entry as it does, it also lets people who don't know how to write great code turn their ideas into reality. Unlike the suggestion of another comment, I've got a great deal of experience with "saner" languages, but despite PHP getting a bad rap because of its low barrier to entry I still admire PHP as a great equalizer.

Re: PHP 8: Before and After

#43
post #6

It's becoming kind of an Enterprise language [1]. Don't get me wrong I think PHP is getting cooler, hopefully everybody catches up and the fact that You can have a shared hosting for pennies run Your PHP code really puts it at an advantage compared to others. [1]: https://github.com/joaomilho/Enterprise

> It's becoming kind of an Enterprise language

It tried for decades to be one with Doctrine, Symonfy and co, trying to copy the worst of Java EE with every single possible design pattern implemented in these frameworks, XML configuration files and co... The problem is no generics, no private packages makes PHP OO a horrible mess compared to Java (or C#).

Re: PHP 8: Before and After

#44

I'm just going to come out and say it, and say it proudly ! 1) I love coding in PHP (I am a cs major) 2) I love riding scooters. There - internet be damned !

1) I love coding in PHP (I am a cs major) 2) I love riding scooters (I am a cs major) FTFY

Hahah ok fine ! I accept it !

Re: PHP 8: Before and After

#45

Earlier quoted context omitted.

True but the php syntax is way too bad (like $ etc) in comparison to Java.

You can’t build websites with Java

Spring Boot and https://micronaut.io/ gets my job done. Thank you. Yes, I build web apps with Java so I don't have to waste my time with php. Life's too short. And I am old enough to remember the abomination Joomla was back in early 2000's and how horrible php was back then when my clients wanted to have their "sites" done in Joomla with custom plugins.

Re: PHP 8: Before and After

#46

I'm glad you can now write: public static function new(): static { return new static(); } It really brings the point across it's static.

I know you're trolling, but FYI the `static` before function has nothing to do with the `static` return type. Like other programming languages the term `static` is used to denote two things.

The term is overloaded, which is a bit unfortunate.

Re: PHP 8: Before and After

#47

Earlier quoted context omitted.

Syntax is very far down the list of problems with PHP

And even those problems are very far down the line if the business logic results in the expected revenue.

Finding talented developers that want to work on your codebase is a factor in your example. More and more developers are realising they don't want to work with PHP. How much revenue will you get without developers?

Go ahead, keep using PHP for your existing multi million dollar product. But using PHP for new projects is not wise.

Re: PHP 8: Before and After

#48

Earlier quoted context omitted.

> This is such a shallow elitist comment. A lot of the common criticisms levied at PHP have been corrected years ago, and PHP is responsible for hundreds of billions of dollars of turnover globally. So does Java, Python, C and C++. This is also a shallow argument. No language is perfect but PHP still suffer from the same design issues a 10/15 years ago, none of them have been correct and it's perfectly valid to point…

PHP is a great fit for the web, always will be. There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn.

> PHP is a great fit for the web, always will be. There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn.

Talking about shallow comment you could say that from dozens of languages that have saner foundations.

> There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn.

No they are not more difficult to set up, not in the era of containers and PAAS. Of course if you still rely on Go Daddy for hosting, it might be...

Re: PHP 8: Before and After

#49
post #7

Earlier quoted context omitted.

Very soon: "A long-standing goal of the WordPress project is to be compatible with new versions of PHP on their release day. The next major version of PHP (version 8.0) is currently scheduled for release on November 26, 2020. WordPress Core contributors are working to ensure PHP 8.0 is supported in the next major version of WordPress (version 5.6), which is currently scheduled to be released on December 8, 2020." htt…

Possibly not what the author meant. Support for PHP 8 in WordPress will come soon after PHP 8 is released. But to upgrade WordPress to PHP 8, that is to rewrite its codebase to make use of PHP 8 features, probably will not happen anytime soon. WordPress still has a minimum PHP version requirement of 5.6, so...

And thank fuck for that.

WordPress is the only web framework I've found that approaches stability of the Linux kernel.

Backwards compat is important and maintained.

Gutenberg hurt this a bit but it still does a great job of maintaining backwards compat.

I take old wordpress websites and update them and everything just works.

I take old laravel or code igniter or Drupal sites update them and everything just fucking falls over.

Fwiw, most modern WordPress development is JavaScript / React based. PHP is just a backend glue language at this point for things like templating.

Re: PHP 8: Before and After

#50

I'm glad you can now write: public static function new(): static { return new static(); } It really brings the point across it's static.

> It really brings the point across it's static.

A bit better, due from 7.x backward it really doesn't transmit any sense to me. Just confusion. And I'm not alone. See https://www.reddit.com/r/PHP/comments/elrnp4/rfc_for_static_...

Post reply on HN