|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-05 20:26 UTC] php dot devel at homelinkcs dot com
[2010-02-17 05:35 UTC] kalle@php.net
[2010-02-17 18:32 UTC] php dot devel at homelinkcs dot com
[2010-02-19 07:55 UTC] svn@php.net
[2010-02-19 07:55 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 15:00:01 2026 UTC |
Description: ------------ The manual says that as of PHP 5.2.12, the range for the base argument to gmp_strval() was extended from 2 to 36, to 2 to 62 and -2 to -36. However, in my tests only 2 to 26 worked. Reproduce code: --------------- foreach (array_merge(range(-2, -36), range(2, 62)) as $num) { if (@gmp_strval(gmp_init(62), $num)) echo "Base $num: GOOD\n"; else echo "Base $num: BAD\n"; } Expected result: ---------------- gmp_strval() should return a value for all bases in specified range. Actual result: -------------- gmp_strval() fails to return a value and gives warning, "Bad base for conversion", for bases -2 to -36 and 27 to 62.