(09) ";echo 9," => (9) "; 你可以试一下.输出结果是: 0 => (09) 9 => (9) 而不是 09 => (09) 9 => (9) 这个译者做了下测试,经过分析得出.0开头的数字会被当成" />

电脑安全

您当前的位置:主页 > 电脑安全 >

PHP中奇怪的数字-网络编程

来源:[db:来源]标题:   宋体    编辑:电脑技术全能网 时间:2019-09-22 06:21

原标题:PHP中奇怪的数字-网络编程
   由一条他人adodb的bug激发的考虑echo 09," => (09) <br>";echo 9," => (9) <br>";你能够试一下.输入成果是:0 => (09) 9 => (9)而不是09 => (09) 9 => (9)这个译者做了下测试,经由剖析得出.0扫尾的数字会被当做8进制,0x扫尾的会被当做16进制,以下:echo 0x11," => (011) <br>";echo 010," => (010) <br>";这个会输入:17 => (011) 8 => (010)固然是10x16+1=171x8+0=8OK.Someone reported a bug in ADOdb, the open source db library i maintain. I went crazy for half an hour until i realised the problem. Here''s a little gotcha you can try:echo 09," => (09) <br>";echo 9," => (9) <br>";If you expect the above code to produce the same values, you are sadly mistaken. Try it. I will post a followup later :)

上一篇:OfficeXP menu class(OOP版)-网络编程

下一篇:没有了