error at function hexdec
| From: | Cornelia Boenigk | Date: | Thu, 26 Feb 2004 13:53:48 +0000 |
| Subject: | error at function hexdec | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969359243@lists.php.net to get a copy of this message | ||
Hi everybody
Tha Manual says:
hexdec() will replace of any non-hexadecimal characters it encounters
by 0. This way, all left zeros are ignored, but right zeros will be
valued.
Example 1. hexdec() example
<?php
var_dump(hexdec("that"));
var_dump(hexdec("a0"));
// both print "int(160)"
?>
This is not correct. The two lines print int(10) and int(160).
Seems the behaviour of the function is, that all non-hexadecimal
values are ignored and *not* converted to 0.
Regards
Conni