Hey Jakub, > On 11 Jan 2015, at 20:10, Jakub Zelenka <bu...@php.net> wrote: > > Let's first show an example and make clear what the whole thing: > http://3v4l.org/2D72Q > > As you can see, the first type (07, 0xff, .1 and -.1) examples are really > inconsistent and give a different results if there are in the array (error) > or as a scalar. This seems like an obvious bug. > > The type 2 is consistent. The only problem is that such number format does > not conform to RFC 7159 where the number is specified in > https://tools.ietf.org/html/rfc7159#section-6 : > > number = [ minus ] int [ frac ] [ exp ] > frac = decimal-point 1*DIGIT > > As you can see there is required a digit after decimal point... In this > case we have a non conforming parser which is not right IMHO.
It’s not even valid according to the train-track diagrams on json.org: http://json.org/number.gif Thanks for your work on this. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php