Dewald,

What do you get on your server if you do:

echo PHP_INT_MAX;

also, what version of PHP are you using?

-Chad

On Thu, Sep 24, 2009 at 2:48 PM, Dewald Pretorius <dpr...@gmail.com> wrote:
>
> Although, looking at a few tweets in the public timeline, I'm seeing
> tweet ids of 4348298962, 4348298957, etc.
>
> At least on my server, json_decode is still correctly decoding those
> numbers.
>
> So, it's probably safe to say that Twitpocalypse 2 has not arrived yet
> for many PHP apps in terms of JSON decodes.
>
> Dewald
>
> On Sep 24, 3:14 pm, Chad Etzel <c...@twitter.com> wrote:
>> On Thu, Sep 24, 2009 at 1:50 PM, Dewald Pretorius <dpr...@gmail.com> wrote:
>>
>> > Abraham,
>>
>> > That is true, but we are going to run into exactly the same problem
>> > with 64-bit status ids.
>>
>> This has already happened. Tweet ids are now bigger than a 32 bit int
>> can store. That's what Twitpocalypse 2 was all about.
>>
>> -Chad
>>
>>
>>
>> > And that is going to break a LOT of PHP applications in one fell
>> > swoop.
>>
>> > Dewald
>>
>> > On Sep 24, 2:27 pm, Abraham Williams <4bra...@gmail.com> wrote:
>> >> Twitter could add:
>> >> "next_cursor_string":"1314614526448841129"
>>
>> >> Minimal cost and it would be backwards compatible.
>>
>> >> Abraham
>>
>> >> On Thu, Sep 24, 2009 at 12:06, Dewald Pretorius <dpr...@gmail.com> wrote:
>>
>> >> > Jesse,
>>
>> >> > It will add exactly two quote characters (") per numeric field in the
>> >> > JSON payload.
>>
>> >> > In any event, I am now hacking the raw JSON output to convert the ids
>> >> > and cursors to string. It's not an ideal solution but it works.
>>
>> >> > Dewald
>>
>> >> > On Sep 24, 12:34 pm, Jesse Stay <jesses...@gmail.com> wrote:
>> >> > > On Thu, Sep 24, 2009 at 9:26 AM, Dewald Pretorius <dpr...@gmail.com>
>> >> > wrote:
>> >> > > > This goes for any large numbers, including tweet ids. As far as I am
>> >> > > > concerned they can output everything in JSON as strings.
>>
>> >> > > That would create quite a memory footprint! I prefer to use ints where
>> >> > > possible and strings only where necessary. I think it would be to your
>> >> > > benefit to just convert to 64-bit PHP. While PHP is type-less, other
>> >> > > languages aren't, and converting back to int is much more a pain in C
>> >> > than
>> >> > > it is in PHP. I suggest Twitter leave it the way it is - it should be 
>> >> > > up
>> >> > to
>> >> > > the end recipient to convert it in a way that works.  Maybe write some
>> >> > new
>> >> > > JSON libraries that parse it correctly? That's what open source is 
>> >> > > for.
>>
>> >> > > Jesse
>>
>> >> --
>> >> Abraham Williams | Community Evangelist |http://web608.org
>> >> Hacker |http://abrah.am|http://twitter.com/abraham
>> >> Project |http://fireeagle.labs.poseurtech.com
>> >> This email is: [ ] blogable [x] ask first [ ] private.
>

Reply via email to