> De : Pádraic Brady [mailto:padraic.br...@gmail.com] > > However, “123” is exceptional. It’s redefining an integer as “ an > integer or a string comprised wholly of digits without leading zeroes, > with an optional leading hyphen, and representing an integer up to > PHP_INT_MAX”
Add leading zeros, and leading/trailing blanks and I think it is still strict enough. > Then again, it’s an exception that requires a long sentence. It’s just > not clear, to me, if this is the sole intended exception, or if that > sentence needs to be expanded to a paragraph. A section? Are we going > to need a chapter? I’m assuming octals-in-a-string are a no-go to be > coerced whereas others might just see an integer with superfluous > leading zeroes. Leading zeros to recognize octal string are not an option, but alternative non ambiguous syntax is possible, in theory. '0x'-prefixed hexa is possible too. Thoughts ? > In a future RFC revision, it might be nice to have a table of the > specific coercion rules applicable to a weak/strong/single-unified > option. I am currently writing this. Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php