Live data from Hacker News

An Internet of PHP

timotijhof.net

21–30 of 333 posts

Re: An Internet of PHP

#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.

Re: An Internet of PHP

#22
"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, is a big red-flag for me.

Re: An Internet of PHP

#23
> Slack uses PHP for most of its server-side application logic […].

> the advantages of the PHP environment (reduced cost of bugs through fault isolation; safe concurrency; and high developer throughput) are more valuable than the problems […]

The "high developer throughput" is really what does it for me.

I remember vividly when I started at Amazon (where PHP is forbidden) and we were spending days building a single relatively basic CRUD endpoints in Java (with Hibernate, that sucks for non-trivial models), I was constantly thinking "this would have literally taken 1 minute and 5 lines of code with Laravel".

You want your whole team to become 10x developers? Switch to PHP.

Between the simply incomparable frameworks that do absolutely all the work for you and the fact that a simple instant page refresh shows your changes, productivity is multiplied.

Re: An Internet of PHP

#24
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…

I'm sorry but if your only reason why PHP and JS are less "clean" than Python is because they have brackets and parenthesis, you're sharing your inexperience, not your experience.

I meant "all those brackets and parentheses" as a synecdoche. I definitely don't mean my opinion to be a comment on any of the actual technical benefits of JS/PHP/Python. Just explaining the reason I've most recently preferred the act of writing one over the other.

Re: An Internet of PHP

#25
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.

Fair enough!

Re: An Internet of PHP

#26

"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,…

Well the problem is that "the internet" (google, stackoverflow) does not (by default) filter out any old/obsolete information.

People googling for solutions will get 30+ year old "advise" on how to do certain things / use certain libraries etc.

Especially StackOverflow should be incorporating a major version number for which the question is valid.

So yes, "PHP is still dead" as long as you get the same old advise.

Re: An Internet of PHP

#27
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 And yet people would take a bullet for React and the JSX templates.

I too find this hilarious. Not because I want to defend PHP, but moreso that I personally sort of despise react and it's whole ecosystem. I've never liked writing code less than when dealing with a spaghetti monster react app.

Re: An Internet of PHP

#28

At the end of the day if your software works and users like it, does the programming language even matter?

Maybe not for the user, at least not directly, but developer experience is something to optimise for.

PHP is also the one language whose choice can make an impact on users' experience, since its shared-nothing (sans caches) runtime model is almost CGI-like and can, in my experience, lead to higher latency, as each request simply does more. Maybe some experienced PHP devs can tell me how they combat this?

Re: An Internet of PHP

#29
post #8

At the end of the day if your software works and users like it, does the programming language even matter?

I agree that it should not matter but there are people out there who really have strong feelings about PHP. I understand those strong feelings because PHP was very popular since it was on every shared host and it was super easy to quickly whip up scripts that render dynamic pages back in the day. That ease had consequences that PHP is trying to dig out from under to this day. I personally reach for PHP first for all…

Still do this day I don't know of any serverside language that you can just drop files into to update.

Re: An Internet of PHP

#30
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…

None of the cleanliness of Python will ever justify the dependency management madness it brings over simply using composer in PHP. It’s not in the same league, not even playing the same game. Give me composer and I’ll get you reproducible installations in CI and prod in three minutes. With Python? The gurus are still discussing the best package manager after the first two days.
Post reply on HN