Live data from Hacker News

An Internet of PHP

timotijhof.net

51–60 of 333 posts

Re: An Internet of PHP

#51
post #21
post #9

I learned how to code when I was a kid with a mixture of C++ my dad showed me on our Dell running Windows 95 and PHP that I taught myself in the years after. All through my teenage years into my early 20s, anything I wanted to make I made in PHP. I still have some PHP projects online, but recently when I want to make anything, I set up an API in Python and build the front with a JS framework. Is part of this just get…

javascript is way worse in cleanliness. PHP has the advantage of having been able to break backwards compat and fix some of its worst messes, even down to some questionable soft equalities. Also PHP nicely sidesteps the string addition/concatenation problem by having a dedicated operator for concatenation.

Even better, you don't even need to worry about those backward compatibility breaks if you wrote relatively clean, warning-free code in the first place. Only the very worst parts of PHP's legacy have been thrown out, and only after multiple years of deprecation notices. They've also been following semver quite strictly since 5.3, so you know exactly when to expect breaking changes.

Compared to the Python 2 to 3 mess and the constant churn that today's frontend frameworks seem to suffer from, I would say that PHP is more serious about maintaining backward compatibility than nearly every other language commonly used in web dev.

Re: An Internet of PHP

#52
post #33

"PHP is dead" is dead. The amount of people praising PHP these days is quite high and increasing. Of course I may also be in a bubble (of php devs), but I have seen a constant increase from JS-people starting to look (and in some cases, convert to) php. Also, many new youtube videos highlighting the new stuff in the language, how modern it is, etc. Honestly, anyone that blindly criticizes or dismisses php these days,…

It’s like meeting someone in 2023 who hates Micro$oft WinBLOWZ. Have they been stuck in stasis for 20 years? What other values from the 9/11 era do they hang on to?

You mean like hating MS for putting ads in the OS?

MS didn't change, they still exploit as much as they can.

And they try to force people people into the cloud unable to secure their own software stack.

MS didn't get better just because Google got worse.

Re: An Internet of PHP

#55
post #52
post #33

Earlier quoted context omitted.

It’s like meeting someone in 2023 who hates Micro$oft WinBLOWZ. Have they been stuck in stasis for 20 years? What other values from the 9/11 era do they hang on to?

You mean like hating MS for putting ads in the OS? MS didn't change, they still exploit as much as they can. And they try to force people people into the cloud unable to secure their own software stack. MS didn't get better just because Google got worse.

Don't forget that now Microsoft ♥ Linux

Re: An Internet of PHP

#56

php runs securely in 5minutes in any web server 3-10$/month. Every other tech, it's complicated servers or complicated billing, not to mention depencies and build tools. thats why php

Not sure why it is downvoted as this is true. That said it is more to do with shared hosts culture choosing PHP than PHP itself. (They tend to support Ruby and Node but not as well)

PHP is also pretty easy to support for shared hosting, as what they essentially need is just an Apache module (+ nginx probably), some clever filesystem permissions and they're done. For node, Python, etc, you actually need to keep the application servers running, which has to stay running even when they're completely idle. So I think PHP is a natural choice for shared hosting for those reasons too.

Re: An Internet of PHP

#57
I like PHP, one issue which I face with PHP though is, that it is difficult to create a self-contained docker image.

With node.js or java spring boot i can build an application with an http endpoint and create a single docker image with all included easily.

With php I need 2 distinct containers, e.g., nginx, php-fpm and the code mounted on a volume to the the containers. So it seems to be more difficult for setup and continous integration etc.

I would like to have one image with php, a webserver and the code. Is there something like that for PHP?

Re: An Internet of PHP

#58
post #7

Earlier quoted context omitted.

Bad rap comes from the inconsistency of the early APIs. The ability to interleave code and HTML was also tacky and never taken seriously but I think touted highly by some as a killer feature. The language is very unplanned, go look at an equality chart for PHP, it makes JavaScript blush as well.

"The ability to interleave code and HTML was also tacky and never taken seriously" - That was the whole point of it! The day I found PHP and could leave behind the cgi-bin and SSI it became my favourite thing - and has paid me well for the last 20+ years :)

Putting HTML inside of scripted code blocks was legendary back in the day and every web-oriented language did it. I guess people have already forgotten about ASP and ColdFusion. Being able to for each an array into table rows? Game changing.

Re: An Internet of PHP

#60
post #33

"PHP is dead" is dead. The amount of people praising PHP these days is quite high and increasing. Of course I may also be in a bubble (of php devs), but I have seen a constant increase from JS-people starting to look (and in some cases, convert to) php. Also, many new youtube videos highlighting the new stuff in the language, how modern it is, etc. Honestly, anyone that blindly criticizes or dismisses php these days,…

It’s like meeting someone in 2023 who hates Micro$oft WinBLOWZ. Have they been stuck in stasis for 20 years? What other values from the 9/11 era do they hang on to?

Oh instead do people believe the obvious BS that Microsoft loves Linux and FOSS and has become an ethical company?
Post reply on HN