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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-17 05:12 UTC] stas@php.net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 17:01:30 2024 UTC