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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 38 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 06:01:35 2024 UTC