Hi Mike, Michael Wallner wrote:
To be honest, I had not even memorised intval() supports a base, but that we have base_convert(). I’d opt for dropping base convert support from intval(), but that’s obviously not possible, because PHP-7.1 is the target for this RFC.
Yeah, it's easy to forget about it. And as I've mentioned before, it violates weak typing, unfortunately. base_convert() is more uniform, but it's horrible in its own way (ignores any characters in any position which aren't of the expected base). The bin/hex/dec/oct family have similar issues.
Alas, you're correct that we can't really do much about this in 7.1. -- Andrea Faulds https://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php