Rev 5 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5 | Rev 33 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | <?php |
1 | <?php |
2 | 2 | ||
3 | /* |
3 | /* |
4 | * PHP GMP-Supplement implemented using BCMath |
4 | * PHP GMP-Supplement implemented using BCMath |
5 | * Copyright 2020-2021 Daniel Marschall, ViaThinkSoft |
5 | * Copyright 2020-2022 Daniel Marschall, ViaThinkSoft |
6 | * Version 2021-05-21 |
6 | * Version 2021-06-29 |
7 | * |
7 | * |
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
9 | * you may not use this file except in compliance with the License. |
9 | * you may not use this file except in compliance with the License. |
10 | * You may obtain a copy of the License at |
10 | * You may obtain a copy of the License at |
11 | * |
11 | * |
Line 683... | Line 683... | ||
683 | } |
683 | } |
684 | 684 | ||
685 | // ----------------- Helper functions ----------------- |
685 | // ----------------- Helper functions ----------------- |
686 | 686 | ||
687 | function base_convert_bigint($numstring, $frombase, $tobase) { |
687 | function base_convert_bigint($numstring, $frombase, $tobase) { |
- | 688 | $numstring = "".$numstring; |
|
- | 689 | ||
688 | $frombase_str = ''; |
690 | $frombase_str = ''; |
689 | for ($i=0; $i<$frombase; $i++) { |
691 | for ($i=0; $i<$frombase; $i++) { |
690 | $frombase_str .= strtoupper(base_convert((string)$i, 10, 36)); |
692 | $frombase_str .= strtoupper(base_convert((string)$i, 10, 36)); |
691 | } |
693 | } |
692 | 694 |