note 73767 modified in function.dechex by danbrown
| From: | danbrown@php.net | Date: | Tue, 16 Feb 2010 23:27:48 +0000 |
| Subject: | note 73767 modified in function.dechex by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166037@lists.php.net to get a copy of this message | ||
To force the correct usage of 32-bit unsigned integer in some functions, just add '+0'
just before processing them.
for example
<?php echo(dechex("2724838310")); ?>
will print '7FFFFFFF'
but it should print 'A269BBA6'
When adding '+0' php will handle the 32bit unsigned integer
correctly
<?php echo(dechex("2724838310"+0)); ?>
will print 'A269BBA6'
--was--
To force the correct usage of 32-bit unsigned integer in some functions, just add '+0'
just before processing them.
for example
echo(dechex("2724838310"));
will print '7FFFFFFF'
but it should print 'A269BBA6'
When adding '+0' php will handle the 32bit unsigned integer
correctly
echo(dechex("2724838310"+0));
will print 'A269BBA6'
http://php.net/manual/en/function.dechex.php