Home  >  Article  >  Backend Development  >  php中的 (unset) 类型转换

php中的 (unset) 类型转换

WBOY
WBOYOriginal
2016-06-06 20:34:571044browse

<code>php</code><code>$str = 'hello world';

var_dump((unset) $str);
var_dump($str);
</code>

有同学知道这个使用场景么?

回复内容:

<code>php</code><code>$str = 'hello world';

var_dump((unset) $str);
var_dump($str);
</code>

有同学知道这个使用场景么?

然而并没有什么卵用。。和直接写null没有毛线区别,个人猜测仅仅是因为类型里有null,所以转换也来个转成null,but why it's (unset) instead of (null),我只能说,who tama knows.

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