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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Dec 22 01:01:30 2024 UTC