#36591 [Opn->Fbk]: decode problem in base64_decode()
| From: | tony2001@php.net | Date: | Thu, 02 Mar 2006 14:39:24 +0000 |
| Subject: | #36591 [Opn->Fbk]: decode problem in base64_decode() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93839@lists.php.net to get a copy of this message | ||
ID: 36591
Updated by: tony2001@php.net
Reported By: hariprakash at cynaptix dot com
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Windows 2000
PHP Version: 4.4.2
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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