相关疑难解决方法(0)

严格标准:只应通过引用传递变量

$el = array_shift($instance->find(..))
Run Code Online (Sandbox Code Playgroud)

上面的代码以某种方式报告了严格的标准警告,但这不会:

function get_arr(){
    return array(1,2);
}
$el = array_shift(get_arr());
Run Code Online (Sandbox Code Playgroud)

那么它什么时候会报告警告呢?

php reference strict

81
推荐指数
3
解决办法
16万
查看次数

标签 统计

php ×1

reference ×1

strict ×1