Re: [PHP-DEV] Integer casts broken or...?

2001-05-16 Thread Jeroen
> Brian Moon writes: > > I know it would confuse me to have 0009 turned into an octal or hex if I > > type cast it to (int). When I think of (int), I only think of their > > ultimate decimal value. Perhaps there needs to be a new type cast ((hex)? > > (oct)?) that will interpret variables in the

Re: [PHP-DEV] Integer casts broken or...?

2001-05-14 Thread Lars Torben Wilson
> From: "Lars Torben Wilson" <[EMAIL PROTECTED]> > To: "Brian Moon" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, May 14, 2001 4:55 PM > Subject: Re: [PHP-DEV] Integer casts broken or...? > > > > Brian Moon writes: >

Re: [PHP-DEV] Integer casts broken or...?

2001-05-14 Thread Brian Moon
<[EMAIL PROTECTED]> Sent: Monday, May 14, 2001 4:55 PM Subject: Re: [PHP-DEV] Integer casts broken or...? > Brian Moon writes: > > This is correct. The type casting converts the string into its integer > > value. If there is a non-numeric character in the string, it stops at

Re: [PHP-DEV] Integer casts broken or...?

2001-05-14 Thread Lars Torben Wilson
is this unintentional? > - Original Message - > From: "Lars Torben Wilson" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, May 14, 2001 1:29 PM > Subject: [PHP-DEV] Integer casts broken or...? > > > > > > Type casting

Re: [PHP-DEV] Integer casts broken or...?

2001-05-14 Thread Brian Moon
- dealnews.com, Inc. Makers of dealnews, dealmac http://dealnews.com/ | http://dealmac.com/ - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 14, 2001 1:29 PM Subject: [PHP-DEV] Integer casts

[PHP-DEV] Integer casts broken or...?

2001-05-14 Thread Lars Torben Wilson
Type casting to int from string works only for decimal values--is this by design? Example: echo (int) '09' . ', ' . (int) '0x24'; ...produces: 9, 0 which seems intuitively wrong (I'd have expected 0, 36). Is this wrong, or should I just document it? Thanks, Torben -- Torben Wilson <[EM