Home >Backend Development >PHP Tutorial >类function里面赋值有用吗?

类function里面赋值有用吗?

WBOY
WBOYOriginal
2016-06-20 12:53:11978browse

function random_text($count, $rm_similar = false){
}
是不是$rm_similar 永远都是false?


回复讨论(解决方案)

不是的,看你有没有传递第二个删除,如果第二个参数你没有传递,那$rm_similar 默认为false

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