Home  >  Article  >  Backend Development  >  数组中添加数字034111,为何显示14409?

数组中添加数字034111,为何显示14409?

WBOY
WBOYOriginal
2016-07-06 13:53:021010browse

$info=array(034111);
echo $info[0];
?>

034111,0034111,00034111....最后输出的都是14409,这是转换成了什么?

回复内容:

$info=array(034111);
echo $info[0];
?>

034111,0034111,00034111....最后输出的都是14409,这是转换成了什么?

在php中0开头的数字是以八进制计算的,八进制的34111转换成十进制就是14409。

0开头是八进制,0x开头是16进制。
(34111)_8 = (14409)_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