Home >php教程 >php手册 >php中一个诡异bug

php中一个诡异bug

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:46:331027browse

$data = array('server' => false);

echo $data['server']["test"];

 

请问这一句怎么样?www.2cto.com

有人可能会说NULL并且NOTICE undefined index "test"

一开始我也这样以为,但是实际上并不是这样,NULL是会输出,但是NOTICE并没有产生,这实在是一个坑爹的实现呀

摘自 无心云

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