[英]php output of print 0500
I have following php code. 我有以下PHP代码。
<?php
print 0505;
echo "\n";
print 0500;
?>
output => 325
320
can anyone tell me how come did this output? 谁能告诉我这个输出是怎么来的?
0x*** - hex number (16) 0x ***-十六进制数字(16)
0b*** - bin number (2, PHP5.4) 0b ***-箱号(2,PHP5.4)
0*** - oct number (8) 0 ***-十进制数字(8)
*** - dec number (10, normal) ***-十进制数(10,正常)
You can get output using this format 您可以使用这种格式获取输出
print "0505"; 打印“ 0505”;
echo "\\n"; 回显“ \\ n”;
print "0500"; 打印“ 0500”;
Because this is octal/decimal convertor 因为这是八进制/十进制转换器
please check this link: http://www.statman.info/conversions/octal.html 请检查此链接: http : //www.statman.info/conversions/octal.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.