PHP 4.0 Bug #6761: problem with decbin();
| From: | coolfr3ak at hotmail dot com | Date: | Thu, 14 Sep 2000 15:24:10 +0000 |
| Subject: | PHP 4.0 Bug #6761: problem with decbin(); | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33288@lists.php.net to get a copy of this message | ||
From: coolfr3ak@hotmail.com
Operating system: Linux 6.1
PHP version: 4.0.2
PHP Bug Type: *Function Specific
Bug description: problem with decbin();
If you call
decbin(-9);
which is equivilent to ~8(NOT 00001000) then it dosn't work - so if I wanted to do anything
like removing a bit from a number like:
$byte3 = $byte1 | $byte2;
$byte1 = $byte3 & ~$byte2;
this works, but if you go
decbin(~$num);
then it throughts a woubly... just thought that maybe this function could be fixed to recognise - as
signbit...
IcK
(Thanks about previous prob.. silly me = = == ... been using too much C++ and didn't realise
php used == aswell :p)