Bug #12012 Updated: dec2bin and bin2dec

From: Date: Sun, 28 Apr 2002 23:39:01 +0000
Subject: Bug #12012 Updated: dec2bin and bin2dec
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6374@lists.php.net to get a copy of this message
ID: 12012 Updated by: jimw@php.net Reported By: yo@yo.com -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Any PHP Version: 4.0.6 New Comment: bindec() and decbin() are exactly what the original request was about. Previous Comments: ------------------------------------------------------------------------ [2001-07-10 14:33:36] jeroen@php.net Hm, I now see that bindec('10101010001') is the syntax, and not a few bytes or something. That is not (yet?) implemented. I'm not sure this should be in PHP. PHP isn't meant to work with binary files. I think that usually there are better alternatives, for example if you're after saving a few bytes of diskspace, this isn't the way to go. ------------------------------------------------------------------------ [2001-07-10 14:22:35] jeroen@php.net Take a look at http://www.php.net/bindec and http://www.php.net/decbin They already exist... ------------------------------------------------------------------------ [2001-07-10 10:52:14] yo@yo.com hi, can you please implement these functions in a future release ? a binary to decimal converter: int bin2dec(string binstr); and a decimal to binary converter: string dec2bin(int decvalue); thanks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=12012&edit=1

« previous php.bugs (#6374) next »