Jim Winstead on Nostr: In the early days of #PHP, I had to argue against the type conversion of strings to ...
In the early days of #PHP, I had to argue against the type conversion of strings to numbers not interpreting it using the '0x' hex and '0' (octal) syntaxes. I wish I'd considered scientific notation.
(I think this would have been around PHP/FI to PHP 3, and was on the non-archived core list.)
Does #PHPStan have a "comparing strings with == isn't safe" rule?
https://toot.cat/@woozle/113849828962032884Published at
2025-01-18 19:09:52Event JSON
{
"id": "fd4cd72286aeaa1f4587f48de9632dd24c0d3777f953ebeef8cb0624fa07679d",
"pubkey": "b43b3234094351947af871aee795d8967a2a6ef3b13f5fdfa3e44e9ed92390c1",
"created_at": 1737227392,
"kind": 1,
"tags": [
[
"t",
"php"
],
[
"t",
"phpstan"
],
[
"proxy",
"https://mefi.social/users/jimw/statuses/113850934364400571",
"activitypub"
]
],
"content": "In the early days of #PHP, I had to argue against the type conversion of strings to numbers not interpreting it using the '0x' hex and '0' (octal) syntaxes. I wish I'd considered scientific notation.\n\n(I think this would have been around PHP/FI to PHP 3, and was on the non-archived core list.)\n\nDoes #PHPStan have a \"comparing strings with == isn't safe\" rule?\nhttps://toot.cat/@woozle/113849828962032884",
"sig": "67b4fc42aa8126628bf4729b714025576512955f446012f0e194828b76c603327dd1d5d9db8b4438d0749a6de8af608dc50550f5f24442fa430223504f2b9f5d"
}