Home > Backend Development > PHP Tutorial > 这个数字如何输出不了

这个数字如何输出不了

WBOY
Release: 2016-06-13 13:46:14
Original
768 people have browsed it

这个数字怎么输出不了?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$str = '12345678901234567890123456789012345678901234567890';

$num = $str + 1;

echo $num;
Copy after login


输出的是科学计数法,我想得到12345678901234567890123456789012345678901234567891

------解决方案--------------------
PHP code
$str = '12345678901234567890123456789012345678901234567890'; 
echo bcadd($str,'1'); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template