Hacker News new | ask | show | jobs
by TazeTSchnitzel 5023 days ago
"almost"?

I'm still stuck on an IPv4 connection at home, in Britain. My phone still can't get IPv6 on mobile internet. My VPS host still doesn't support IPv6 on my server. And PHP still fails to properly parse some types of IPv6 address.

Things have got better, sure, but don't say it's almost gone. Far from it.

2 comments

The notice is about IPv4 allocation, not about IPv6 market penetration. RIPE NCC has just begun allocating IPv4 addresses from the last available /8 block.
Ah, fair enough.
> PHP still fails

It still fails to reject February 31, I'm completely not surprised to hear that it fails on IPv6.

I don't know which specific function you're talking about, but there may be a good reason for it.
Both strtotime() - PHP's "take a string and do your damnedest to make a date out of it" function - and DateTime.parseFromFormat() - the more restrictive TZ-aware class - accept it and give you March 2/3. There's a separate validate_date() or something like that that actually rejects Feb 31.
I'm not sure that's entirely wrong, just a different attitude than you might expect. Also, for that matter, I think MySQL accepts, will store, and will retrieve Feb 31 IIRC. Why? It's liberal in the correctness of input.