[PHP-DEV] PHP 4.0 Bug #6761: problem with decbin(); From: coolfr3ak <email protected>
Date: 09/14/00

From: coolfr3ak <email protected>
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)

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>