php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6761 problem with decbin();
Submitted: 2000-09-14 11:24 UTC Modified: 2000-09-17 05:12 UTC
From: coolfr3ak at hotmail dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.2 OS: Linux 6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: coolfr3ak at hotmail dot com
New email:
PHP Version: OS:

 

 [2000-09-14 11:24 UTC] coolfr3ak at hotmail dot com
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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-17 05:12 UTC] stas@php.net
fixed in CVS
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 27 07:01:26 2019 UTC