php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9151 base_convert interprets letters w,x,y,z as 0
Submitted: 2001-02-07 11:02 UTC Modified: 2001-02-14 06:36 UTC
From: gherson at snet dot net Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.0.4 OS: Linux 2.2 - Redhat 6.2
Private report: No CVE-ID: None
 [2001-02-07 11:02 UTC] gherson at snet dot net
Hi.  Base_convert interprets letters w,x,y, and z to be zero but should handle letters up to z: "Digits in numbers with a base higher than 10 will be represented with the letters a-z, with a meaning 10, b meaning 11 and z meaning 35." -- http://www.php.net/manual/en/function.base-convert.php

Shows problem:
$base32 = 'x';           // a-v ok, w-z=0
$base10 = base_convert($base32, 32, 10);
echo "base10: $base10\n";

My configure line:
./configure --with-cybercash=/usr/local/bin/mck-3.3.0-i586-pc-linux-gnulibc2.1 --with-pgsql=/var/lib/pgsql --with-apxs

thanks,
George 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-07 11:12 UTC] gherson at snet dot net
Sorry, stupid mistake on my part.  Pls ignore
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC