Live data from Hacker News

Go with PHP

gowithphp.com

211–220 of 532 posts

Re: Go with PHP

#211

Also: lets not forget one very important and under-rated side-effect of PHP -- it lets you write server-side code that can leverage a 'public' address. You might think 'well, doesn't everything let me do that?' Not quite. On 'free' VPS servers they usually have 'ephemeral' IPs or IPs that change. So while you get free bandwidth and compute -- it's hard to actually do anything useful with it like run a service if you…

Being able to host for free on dodgy free hosting is hardly a benefit anyone should care about.

You can throw it into lambda or vercel for that matter too. Yes you can use sketchy hosts but still can use legit ones too to host for free or very little money.

Re: Go with PHP

#212

> There is no need to compile anything. But I really like compilers, they catch a whole class of bugs, before I run things.

The compilation step, and the resulting binary, is also very useful if you need to distribute your software. As opposed to creating a ZIP file.

There are tools for creating stand-alone executables from PHP source code, but they're not as nice to use, compared to languages that were designed for this. By distributing software I also mean making your latest code live in prod.

I suppose the benefit of using PHP (or other interpreted languages) is that it's easier to create "plugins", just copy the new source files to the server.

Re: Go with PHP

#213
The fact that you can build a whole app inside just one index.php file is highly underrated and I understand how newbies finding this out are getting excited.

I remember when Rails first launched and I wanted to try it but it was so complicated to get started.

Re: Go with PHP

#214

Earlier quoted context omitted.

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

PHP has matured and has been a nice language for a decade now. But PHP developers havent. Cargo culting “good practice” and lack of creativity plagues the community. Frameworks have become so heavy that you spend more time configuring them than actually adding value. Oh and some still argue over setters and getters.

That hasn't been my experience at all. Although, I do spend more time interacting with the Laravel community (a subset of the PHP community) than the PHP community itself.

I found the (Laravel) community to be more about object-level discussions ("how to do x feature the best way possible") rather than meta-level discussions.

Re: Go with PHP

#215

Earlier quoted context omitted.

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

PHP has matured and has been a nice language for a decade now. But PHP developers havent. Cargo culting “good practice” and lack of creativity plagues the community. Frameworks have become so heavy that you spend more time configuring them than actually adding value. Oh and some still argue over setters and getters.

But that’s kinda their point… you spend time configuring the framework instead of reimplementing from scratch and doing the plumbing yourself.

Re: Go with PHP

#217

Earlier quoted context omitted.

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

I love PHP, but a red flag?! If they’re busy in the Ruby/Java/C#/Go worlds (all get-it-done environments) then I’d just assume they don’t read many Hacker News praises for PHP. It’s easy to have not encountered it since the bad old days unless you work on a team that uses Laravel for some things. I do understand hiring someone who has that tradesman programming ethic and is comfortable with Linux, but that’s more req…

Exactly how I feel reading this thread, I had no idea PHP has changed so much.

Re: Go with PHP

#218
post #6

> Your website is automatically protected against XSS, session hijacking, CSRF, SQL injection, host header attacks, and other vulnerabilities. That's quite misleading however

I think the easier way to do things is mostly always the secure way in Laravel, so unless you go out of your way to do something weird, you're mostly safe from those attacks once you know how it works under the hood (to some extent) and what Laravel does and does not do for you.

Re: Go with PHP

#219
post #132

Earlier quoted context omitted.

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

> It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. Depends on the reasons. One good reason for preferring another language is .NET/Java business app developers can earn a lot more here than PHP developers ;)

Oppositely: not being able to articulate the problems with PHP/Laravel compared to a stack of say Kotlin/Ktor or C#/MVC or Java/SpringBoot is a red flag too in my book.

Re: Go with PHP

#220
post #63

Earlier quoted context omitted.

When are these ever issues? In a real life scenario

In almost any scenario? >I couldn't fit the data set in memory with PHP. But I could do it with Go. I guess this on is self-explanatory. >I couldn't do parallel computations in PHP in order to respond to an HTTP request quickly enough. But I could do it with Go. Consider the following (covers both statements above): you need to get some data from a few sources (databases etc) do some computation on each set and then…

> you need to get some data from a few sources (databases etc) do some computation on each set and then do some sort of mapping to get the resulting set. You may want those computations to run in parallel and idealy you'd like to start mapping as soon as each computation function starts producing results.

This definitely sounds like a typical situation for handling the job in a queue (plus with an async library like spatie/async to retrieve data in parallel), though I see the advantages and convenience of using a natively-async language here.

Post reply on HN