Live data from Hacker News

25 Years of PHP

jetbrains.com

331–340 of 426 posts

Re: 25 Years of PHP

#331

Earlier quoted context omitted.

Many smaller PHP web sites are deployed on VPSes and managed with CPanel or Plesk control panels. None of what you describe is necessary. The web server is pre-configured and PHP settings can be easily changed. Even setting up PHP on Ubuntu or CentOS is a 5 minute job. Tweaking configuration settings for max upload, max post size, etc. are very common and well understood. Once everything is in place, most deployments…

"Easy to deploy" and "Many cheap webhosts are already configured for it" are still very different things. I never found it helpful to conflate them. For example, a VPS with CPanel/Plesk is quite the dependency. As is "a cheap PHP webhost with servers configured for your PHP scripts".

I look at it this way: PHP apps are so easy to deploy, it's a commodity. I run my own dev servers then move them to VPSes, billed to the client, for deployment.

Re: 25 Years of PHP

#332

Earlier quoted context omitted.

> A completely different, but much more enjoyable environment and much more friendly people. You must have found a neat subculture in Java - not been my experience at all. The "shared agreement" thing - I've moved between multiple Java environments over the years, and there's never any agreement between companies on the 'right' way to do Java. Open communities in Java - I've often felt they require a huge amount of t…

All communities are defensive, when someone comes in with "this is shit, why can't I do it like I do it in X". Are you not aware of the flamewars between RoR and Enterprise Java people, when RoR was being pushed into the enterprise?

I'm aware, and coming in with "this is shit" - yeah, that ain't cool, and I'd never expect that to 'work'. Coming in with questions people consider "too basic" is another problem.

Re: 25 Years of PHP

#333
post #325

Earlier quoted context omitted.

Um, I'd criticize a C++ programmer who didn't know anything about the STL as well. Sure, you don't need to know the STL to write C++, but it's an odd decision. If you're going to use a tool, you have to learn it if you want the job done properly. PHP is old and carries some cruft along with it for compatibility reasons (I suppose). When mysql_* was implemented, the world was a gentler place, and SQL injection wasn't…

I agree that the population of programmers who knew about SQL injection was much smaller, but it was certainly widely understood by people who cared. I believe that msql_* were implemented in PHP 3.0, in 1998. By comparison Perl's DBI was first released in 1994, with placeholders and an explanation of why they were important. Of course the idea wasn't original to DBI, the feature was based on an existing Oracle featu…

>but it was certainly widely understood by people who cared.

Rasmus Lerdorf and the early-to-mid PHP community simply didn't care. As you can see by the quotes I posted in another comment, Rasmus Lerdorf actually brags about how much he doesn't care. It's a textbook example of anti-intellectualism.

https://en.wikipedia.org/wiki/Anti-intellectualism

What the early-to-mid PHP community cared about, and was extremely successful at, was evangelism, and recruiting as many new inexperienced developers as possible.

That didn't mix well with all the foot-guns and design flaws they carelessly built into the language, and left in for far too many long years.

Along the axis of care, PHP is the opposite of Java. Compare PHP's complete lack of design with how carefully and conscientiously Java was designed (I may not agree with all of Java's design decisions, but at least they're all carefully researched, thought out, and debated to death first):

https://news.ycombinator.com/item?id=22210073

>"In the Java universe, pretty much everybody is really disciplined. It's kind of like mountain climbing. You don't dare get sloppy with your gear when you're mountain climbing, because it has a clear price." -James Gosling

Re: 25 Years of PHP

#334
I think probably the most ironic thing about all the hate PHP gets, is that those who hate it the most seem to assume that the people who chose to use it did so without exploring other options.

So {your favorite language here} was turned down by a potential developer because they saw PHP as the better option. People aren't stupid but from all the rhetoric it seems the "geniuses" in the group think they are.

I wish I could request a POLL here. I'd ask, from all the people who hate PHP and write extremely long posts about their hate for the language: How many of you used some of that energy you expend hating PHP to write a patch or feature for your favorite language to make it more desirable for other developers?

Re: 25 Years of PHP

#336
What I tell other people what it's been like working with PHP, it's usually this:

"Working with PHP is like having a crazy guy with a gun on your side, by his nature he is powerful and potent, and you can definitely get a lot of stuff done with him... but who the hell gave this guy a gun?"

Re: 25 Years of PHP

#337
post #180
post #32

I wrote a lot of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it. Is it a perfect language? No. But which language is? (I can hear the Lisp crowd gr…

> The only ceremony you need to write executable code is the This is a hugely underrated benefit of PHP overall, and arguably the one reason better designed languages won't replace it for web development purposes. You don't need a command line or SSH access or server management knowledge or many resources/A VPS or dedicated server or well, pretty much anything. It's also why about 99% of fancier, more up to date alte…

Well even bigger reason might be the overhead of php apps. PHP is poormans Lambda. It allows many apps to live on same server and only take resources they need.

It's not pretty but this allows shared hosting to exists. Those power big chunk of the content of the internet.

Re: 25 Years of PHP

#338
post #157

Earlier quoted context omitted.

I dont agree with you at all. Why are you building arrays with mixed key types? Why do you want type hints? Why do you need generics in a dynamically typed language? Php has pthreads. They just arent needed that often. Async is being worked on You didnt mention it but immutable types are also being worked on. Everything people complain about php over tends to actually make its way into the language eventually. I dont…

> Why are you building arrays with mixed key types? It happens on accident. All keys are converted to ints if they can be. So if you read a file that is called "123", it'll suddenly become an int key whereas all the rest will be strings. That's absolutely insane. > Why do you want type hints? The same reason anybody does. It is a contract and it makes your code more well-documented, more robust, and more correct. The…

all your arguments can be true or false. depending on the use case and the position you look from, a language can be defined good or bad. there is no objective answer. from a commercial point of view php is for example one of the best languages ever. from a technical perspective maybe not so much. please accept different realities. don't get stuck in your own.

Re: 25 Years of PHP

#339

Earlier quoted context omitted.

I know you don't care, you've made that very clear. If you cared about truth or accuracy, you wouldn't have made an appeal to your own authority by bragging about impossibly using PHP and making database driven web sites for 39 years, or tried to excuse your moving the goalposts by claiming to "have a bad habit of not clicking on parent to see what the context of a post is". "I don't care" is Rasmus Lerdorf's attitud…

What are you getting out of this? He worked on php and look how far it came, what have you done? Your own website was written in php which you took down due to a security vulnerability in a framework... now is it php fault that someone wrote vulnerable code? "Temporarily offline due to Drupal security vulnerability."

Survivor bias. For Rasmus there were 10000 other developers which have been relegated to just annoying their fellow enterprise coders.

It looks a lot more like someone there at the right place and the right time.

Re: 25 Years of PHP

#340
post #95

Earlier quoted context omitted.

Is a heftier compile step totally fine? The biggest difference between PHP and Java in my mind is that you start Java and pay the compile cost on server start, in PHP you pay the compile cost on every request, frameworks and language features increasingly hide this future cost in caches but caches are one of the two hardest things in computing and often act like pushing things under the carpet, why optimise the compi…

Meanwhile with something like NextJS/TypeScript/React you can just enjoy instant reloads without ever caring about F5 again The more languages the better IMHO though

Did you just deliberately redefine 'reload' just to incite a flamewar, or do you really not know what's different in your example?
Post reply on HN