Integer casts broken or...?
| From: | Lars Torben Wilson | Date: | Mon, 14 May 2001 18:29:29 +0000 |
| Subject: | Integer casts broken or...? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-55216@lists.php.net to get a copy of this message | ||
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 <torben@php.net>
http://www.thebuttlesschaps.com
+1.604.709.0506