首页 > 代码库 > Only variables should be assigned by reference

Only variables should be assigned by reference

php 兼容问题1

$this->_base_classes =& is_loaded();

$this->_base_classes = is_loaded();

引用返回的正确例子

<?php
function &returns_reference()
{
    return $someref;
}

$newref =& returns_reference();
?>

php 兼容问题2 

return $_config[0] =& $config;

$_config[0] =& $config;

return $_config[0];

 CI2这地方写法有问题

技术分享

 

Only variables should be assigned by reference