This time for everyone to bring PHP to calculate the integer set of large numbers, PHP to calculate the number of extra-large digital integer set of considerations, the following is the actual case, take a look.
Needless to say, the exact code is as follows:
function Getintadd ($a, $b) {$c = "; $bCount = strlen ($b); $aCount = strlen ($a); $count = max ($bCount, $aCount); $aDiff = $count -$aCount $bDiff = $count-$bCount; for ($i = $count-1; $i >= 0; $i-) {$aVal = $count-$i <= $aCount? intval ($a [$i -$aDiff]): 0; $bVal = $count-$i <= $bCount? Intval ($b [$i-$bDiff]): 0; $v = $aVal + $bVal, if (strlen ($c) > 0 && strlen ($c) >= $count-$i) {$c = ($v + in Tval ($c [0]). substr ($c, 1,strlen ($c)-1);} else{$c = $v. $c. ';}} return $c;} $a = ' 23490234328490289048902384908392849238 '; $b = ' 234320498324982390489328498230984982399290384902384 '; $c = Getintadd ($a, $b);p Rint_r ($c);
Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!
Recommended reading:
PHP shared memory usage and signal control use case resolution
How to add a popup box to the applet's Product Details page