在这个给定的例子中;
public function something($input)
{
if(something) //true case
return "something";
if(another something) //true case
return "another something";
}
$this->something('something');
我应该return;
用来确保功能在第一个TRUE
案例后不会继续运行吗?喜欢;
if(something) { //true case
return "something";
return; //stop the execution
}
是否有必要,或者单个返回已经停止函数的执行?