On 08/03/2017 22:24, Andrey Andreev wrote:
This is why I was concerned about the discussion becoming too broad - it brings us (or me anyway) back to square 1, if not even out of bounds.
Sorry :(
I do agree that we can't have pseudo-types for everything, but can we at least have meaningful ones?
Sure, but you need to justify why your particular choice of pseudo-type is more meaningful than any of the other combinations.
I still don't understand what you're using this check for that means you want to exclude integers. If you're passing on the value to anything that actually needs a string, you're doing a string cast, either explicitly or implicitly, so there's no difference between me passing you (string)'42', (int)42, or new class { function __toString() { return '42'; } }
My best guess was that you wanted to do something *different* if it was an integer, but as I showed in my last example that doesn't actually need you to exclude them from the new function.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php