Home  >  Article  >  Backend Development  >  相关php中字符串作数组的操作

相关php中字符串作数组的操作

WBOY
WBOYOriginal
2016-06-13 13:07:10806browse

有关php中字符串作数组的操作
$str='1234567890abcdefgh';
echo $str[0];
这个官方是怎么认定的啊?

------解决方案--------------------
弱类型语言 编译的时候会自动帮你转换的
------解决方案--------------------
好像从C语言开始,字符串数据就被视为多个单个字符组成的特殊数组了。比如'abc',就是由'a''b''c''\0'组成。

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