Hacker Newsnew | past | comments | ask | show | jobs | submit | krick's commentslogin

PHP is EXTREMELY backwards-compatible in general. All breaking changes are (i.e. were up to this point) usually introduced very gradually, first emitting Notices and Warnings and not without a very good reason.

For a certain value of "gradually". Whether it's too fast or not comes down to opinion (and some of the changes themselves come down to a difference of opinion on how a given language feature "should" work), but it's the reason so many old sites are stuck on PHP5 - because it's not fully backwards-compatible.

A poster phrased it well on here recently¹: "in general lots of users being on unsupported releases should also cause some reflection why that is. E.g. maybe support periods are too short or there are too many breaking changes with new releases."

¹ https://news.ycombinator.com/item?id=50194270


> the reason so many old sites are stuck on PHP5

Right, and you surely mean 5.3, not 5.4. There is a difference between "extremely backwards-compatible" and "not breaking anything ever", you know. I converted (gradually, through each major release, of course: skipping versions indeed would be more difficult) huge ancient codebases from pre-5.3 to 8.* just fine, and there wasn't even LLM to help me back then. It wasn't that hard. PHP never introduced anything close to Python 2 vs Python 3 situation.


Obligatory xkcd, wrt legacy support: https://xkcd.com/1172/

Ok, let's see what do we have in here.

Not a huge fan of partial function application syntax. Was it really necessary when you already have short anonymous function? What does it cost you to write that explicitly? Like, 10 extra characters? It is way more readable and clear what you mean when a variable has a name, not just `?`. WTF is `?`?

Pretty much the same for DocComments for params. Uh... why? I don't see anything wrong with the old way.

Duration class... well, we all already had duration classes in our projects, didn't we? It looks alright, but it's a real pity operator overloading isn't a native part of the language still. Why do we still have to `->add()` instead of `+`?

Similarly harmless but not hugely exciting are `clamp()` and `SortDirection`. The former isn't that hard to implement, but I don't think I ever did somehow, so thank you. SortDirection is literally just a built-in enum, not a huge deal. Libraries will still use their own implementations for a long time just to preserve back-compatibility.

Polling... Well, I'd usually opt for some other language instead of using PHP like that, but sometimes you need it.

Stream Error Handling and Readonly Defaults are great and overdue.

All in all, doesn't look to be a terribly exciting update.


> What does it cost you to write that explicitly? Like, 10 extra characters?

The given example is 26 additional characters, and that's without any type declarations. Also calling closures isn't free, there is a small performance penalty.

    fn ($version) => version_compare($version, '8.6', '>=')
vs

    version_compare(?, '8.6', '>=')

> Pretty much the same for DocComments for params. Uh... why?

The reason is that docblocks are used to attach meta data to code, like generics.

> SortDirection is literally just a built-in enum, not a huge deal. Libraries will still use their own implementations for a long time just to preserve back-compatibility.

Symfony at least conditionally defines a SortDirection enum in the global namespace: https://github.com/symfony/polyfill-php86/blob/1.x/Resources...


I mean... It is so obvious that I truly have to think that everyone in the comments who pretends it isn't are just Claude bots.

What is this idiotic manner of typing full articles in lowercase? Don't people learn basic orthography in school anymore? This is fucking unreadable.


It asks you to choose 4 (four!) "secret questions" as a "security" measure. I decided that keeping your domains with an organization that insists on idiotic practices that are firmly forbidden by every sensible security practices guide (OWASP, NIST 800-63, anything, really) since like 2015 is not a very wise choice.


Tell that to the banks, alarm companies, etc that do the same thing :-/

I just always use a plausible but false and unique answer, which I just keep track of in my password manager.


mother's maiden name: 14t&7--ghv&32@/apER;Aa0)/90sIs


> mother's maiden name: 14t&7--ghv&32@/apER;Aa0)/90sIs

This isn't a good idea....

If using random text, there are many examples of, when asked to answer a secret question, telling the call centre droid "I just hit a few random keys for that one" and this being accepted.

You would do well to assume each call centre droid is a board kid more interested in his co-workers tits than your clever answers to security questions.


Good luck reading that out loud over the phone to technical support if you get locked out of your account.


Technical support sees the answer to the question in plain text, so after you read first three random characters correctly they will confirm your identity and then patiently wait until you finish reading.

Also my real mother maiden name is almost equally hard to comprehend for english-speaking tech support, so it doesn't make much of a difference.


If my mother's real maiden name is Johnson, I write in random false name like Smithers-James.

It's plausible, hard to guess, and harder to social enginer than "It's a bunch of random letters and numbers."


- I don’t get locked out of my account.

- Porkbun doesn’t have this bullshit, how do they get by?


You do you, but that is enough of a red flag to actually mention when somebody recommends Dynadot to everyone else without much elaboration.

Also, banks are really different from domain registrars in several important and relevant respects, but, for the record, I don't have to tell it to the banks I use, and if I did, I'd probably be looking for a bank that I don't have to tell it to.


Just since 2015? Also, thanks, now I feel old.


There are in that very Reddit thread though.


Honestly, so far Porkbun haven't fucked me yet but sad to see them going down the same route as namecheap

Are there any decent non-US based domain provider remaining at all?


Mythic Beasts.

That is the actual name of the company, not a statement on the scarcity of decent non-US based domain providers.


Damn, that's a leet social security number.


Ok, so let's say you are an Orthodox Jew business owner. Can you let your goyim to continue making profit for you on Saturday, or "does that itself take away from the spirit and sanctity of the day" too? I don't see how it's different from the problem at hand.

More seriously, though, thinking about this pretty silly (in my view) question makes me want to talk to some Rabbis to clarify some things. AFAIK, the existence of free will is pretty fundamental to Judaism (unlike Islam or branches of Protestantism), and having pretty materialistic views on the question of free will myself (i.e. it doesn't exist, obviously), I struggle to imagine how the alternative views can survive contemplating if you can let your AI-agent run on Saturdays. I mean, I think I understand how, say, Orthodox Christians can keep these views today, but they don't really have such meticulous legal system built upon purely theological discussions. So, as an Orthodox Christian, even if you fully understand the implications (which, of course, most people don't, but that's besides the point) it isn't really a problem to consciously accept whatever beliefs about free will while still being very materialistic about most practical questions. But since my knowledge of Jewish theology is extremely limited, I have no idea if you even have to have some specific views about determinism for halakha to be self-consistent.


A restaurant here (Seattle) has a "Shabbat lease" where the business is operated and staffed by a separate group for part of the week. I'm not sure on the details, but I think they had to word the contract in a very specific way (and even then I'm sure different authorities would have differing opinions on how acceptable it is). I'm used to it meaning "we close early Friday, don't open Saturday".


How do you insure such a thing from fires or liability? Split insurance contracts 1/6 th 5/6th


Probably even luminescent paint to be sure it can be seen in the dark. This is even more valuable than a sparkly gemstone, I suppose, that's almost magical!


I wonder what exactly these laws prohibit. Like, does it apply to a fully encrypted cold-copy on Amazon Glacier? If you don't store the encryption key outside of UAE, I'd say this isn't even the same data that gets transferred to the third party, it's just some random blob. But I have no idea if the authorities of that country would agree and if it's even actually enforced for that matter, or if it's one of those laws that actually cause problems only if you follow them.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: