Home  >  Article  >  Backend Development  >  PHP数字012打印是10

PHP数字012打印是10

WBOY
WBOYOriginal
2016-06-23 13:06:221231browse

$a = 012;
echo $a/4;
这样$a是10为什么是10啊。
有没有类似的这样转字符串的问题,请多多补充谢谢。


回复讨论(解决方案)

0 开始表示的是八进制数, 012 就是 十进制 8 + 2 = 10

Statement:
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