Re: [PHP] unexpected results using sprintf() with %u

2003-10-03 Thread David Otton
On Fri, 3 Oct 2003 15:51:59 +1000, you wrote: >Im trying to retrieve the unsigned value of an integer. sounds pretty simple... > >[code] >$i = -86; >echo "" . sprintf("%d", $i); >echo "" . sprintf("%u", $i); >[/code] > >produces: >-86 >4294967198 > >what i expected: >-86 >86 > >Ive searched the ar

Re: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Curt Zirzow
* Thus wrote Cody Phanekham ([EMAIL PROTECTED]): > Im trying to retrieve the unsigned value of an integer. sounds pretty simple... > > [code] > $i = -86; > echo "" . sprintf("%d", $i); > echo "" . sprintf("%u", $i); > [/code] > > produces: > -86 > 4294967198 > > what i expected: > -86 > 86 > >

Re: [PHP] unexpected results using sprintf() with %u

2003-10-02 Thread Tom Rogers
Hi, Friday, October 3, 2003, 3:51:59 PM, you wrote: CP> Im trying to retrieve the unsigned value of an integer. sounds pretty simple... CP> [code] CP> $i = -86; CP> echo "" . sprintf("%d", $i); CP> echo "" . sprintf("%u", $i); CP> [/code] CP> produces: CP> -86 CP> 4294967198 CP> what i expected