Bug #12012 Updated: dec2bin and bin2dec
| From: | jeroen@php.net | Date: | Tue, 10 Jul 2001 18:33:38 +0000 |
| Subject: | Bug #12012 Updated: dec2bin and bin2dec | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-59590@lists.php.net to get a copy of this message | ||
ID: 12012
Updated by: jeroen
Reported By: yo@yo.com
Old Status: Closed
Status: Open
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.0.6
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12012&edit=1