Live data from Hacker News

Go with PHP

gowithphp.com

381–390 of 532 posts

Re: Go with PHP

#381
post #283

I've been using PHP for about 19 years and what I can tell is that both the language and its community have evolved the right way. Writing modern PHP is a joy, IDE support is great and we have tools for everything. Modern PHP is about community standards, not about any particular framework and exposing Laravel as the best way to get started with PHP is questionable. I wouldn't recommend it to anyone wanting to learn…

Yeah, I think phptherightway.com does a much better job introducing people to modern PHP.

Re: Go with PHP

#382
Even if you write modern strongly typed PHP and make sure to handle all your exceptions you will still encounter null (and other) errors at runtime. The language is ok these days and far faster than Python & Ruby etc but still I would not choose a new project to use it.

Re: Go with PHP

#383
post #141
post #24

I'm in the group described halfway down: was on the Internet during PHP 5, lost interest in it, and moved on [to Go]. I haven't written anything in PHP newer than version 5. Even transitioning from 4 to 5 was quite a big deal, I definitely noticed improvements. But it wasn't enough. I couldn't fit the data set in memory with PHP. But I could do it with Go. I couldn't do parallel computations in PHP in order to respon…

[flagged]

If you had stuck to facts rather than being insulting and inflammatory, I don't think your comment would be downvoted.

You make some interesting counterpoints but people aren't going to see them because of the counterproductive language surrounding them.

You should take a look at the HN guidelines.

Re: Go with PHP

#384
post #307

"500,000 orders per month" That's like, what, 12 orders per minute? Is this meant to be impressive or something? I bet any language run on a modern laptop can handle that.

For every request that generates an order, there are probably a dozen or more requests that doesn't generate any order. Also, OS these days are so bloated a $6 vps will barely has any memory left on startup before you actually run any workload on it.

Re: Go with PHP

#385
post #105

Earlier quoted context omitted.

You're doing something terribly wrong. Sounds like caching isn't setup and your http -> php handler is cold booting the interpreter for every single request. Check these Go vs. PHP benchmarks. PHP is quite fast and stands up nicely to the performance you get out of Go. https://www.techempower.com/benchmarks/#section=data-r21&l=z...

Isn't that synthetic benchmarks for toy projects? The amount of code which is run on every request grows with the size of the project in PHP/Symfony (which can take quite some time in a huge monolith), while in Go, everything is usually initialized once at startup.

[deleted]

Re: Go with PHP

#386

Earlier quoted context omitted.

You lost me at WordPress haha... Ive a lot of love for WP, but I don't really get the appeal of extending it past blogging... if you're doing anything more complicated it's pretty trivial to implement blogging functions in your site.

The days of WordPress being used for only blogging are long gone. I have many, many multimillion dollar clients using it as the hub for their whole company (none of which have blogs). It's crazy how it just...works. A little PHP-FPM tweaks here, a couple NGINX tweaks there, and you're off to the races. Very little maintenance, almost no downtime ever.

No doubt you're right, but the "just works" part kinda just seems like it's to be attributed to the LEMP stack no?

I just wonder if a lot of these shops would be better off starting from something like OctoberCMS or all the Laravel add-ons like Nova or Spark which give you Admin and Billing UIs pretty instantly?

Re: Go with PHP

#387

I am an erstwhile PHP apologist. Having come back to PHP after a long time away (not really by choice), I can confirm that the language has improved significantly since PHP5. PSR was a huge success in a lot of ways. However there are still a few things that prevent it from being my language of choice. First off, there is a surprising number of core behaviors you'd expect from a modern web application that there isn't…

Async Messaging: https://symfony.com/doc/current/messenger.html#transports-as...

Some of your complaints are a little weird. * The OS package/pear package thing is highly dependent on what language features you want to add to the base language. If you want, you can install all those features with pear. It's just easier to install with OS packages. * Composer used to add libraries to your code base * The fact that "many projects still aren't containerized" has nothing to do with PHP. I doubt there are many languages where that statement isn't true. * No idea why you think Symfony has fallen off. Laravel has large chunks of Symfony code inside it and the project is going strong with regular releases.

Re: Go with PHP

#388
Can anyone with experience in both compare modern PHP and Laravel vs modern Ruby and Rails? Which one would you choose and why, assuming you have the same experience in both?

I’m asking because I keep hearing Ruby on Rails is the best for starting a SaaS, etc but from my little experience on it, it seems to me Laravel is way better. Is it just a “language” thing? That most people prefer Ruby to PHP?

Re: Go with PHP

#389
post #5

They’re not wrong… PHP7+ is blazing fast, has a huge library, gradual typing support, etc. If starting a new project in the space where they all “compete”, I would choose PHP7 or PHP8 with Laravel or Symfony (or maybe even WordPress) over Rails, Django and probably over NodeJS.

Not gonna bash PHP, but WP... never again.

My experience with WordPress has been broadly positive under certain use cases. What were the negatives you saw/issues you ran into?

Re: Go with PHP

#390
post #171

Earlier quoted context omitted.

I think more documentation teams need to know of the concept of Diataxis [1] so they can invest in the 4 different kinds of documentation developers turn to for help when picking up a new technology: - tutorials; - how-to guides; - technical reference and; - explanation. 1: https://diataxis.fr

This looks very nice and is something I have been searching for but didn't know existed. Thank you!

See also the C4 model "for visualising software architecture". https://c4model.com/
Post reply on HN