#36591 [Fbk->Bgs]: decode problem in base64_decode()
| From: | derick@php.net | Date: | Thu, 02 Mar 2006 14:46:45 +0000 |
| Subject: | #36591 [Fbk->Bgs]: decode problem in base64_decode() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93841@lists.php.net to get a copy of this message | ||
ID: 36591
Updated by: derick@php.net
Reported By: hariprakash at cynaptix dot com
-Status: Feedback
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows 2000
PHP Version: 4.4.2
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2006-03-02 15:39:23] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2006-03-02 15:30:30] hariprakash at cynaptix dot com
Description:
------------
base64_decode() gives a same output of '4' for two inputs 'NA==' and
'NO'. But base64_encode() gives output of 'NA==' for input '4'. I am
currently using PHP 4.2.3 .
Reproduce code:
---------------
// 4 as str.
echo "4-". base64_encode( '4');
// or as int.
echo "4-". base64_encode( 4);
echo "<br />NO-". base64_decode( 'NO') ."-";
echo "<br />". base64_decode( base64_encode( '4'));
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36591&edit=1