Home  >  Article  >  Backend Development  >  PHP错误:Only variables should be passed by reference

PHP错误:Only variables should be passed by reference

WBOY
WBOYOriginal
2016-06-20 13:02:431074browse

PHP错误:Only variables should be passed by reference

原因在于PHP5.3版本开始,array_shift不支持函数返回

$tag_sel = array_shift(explode(' ', $tag));

上述写法改成下面写法

$tag_tmp = (explode(' ', $tag));
$tag_sel = array_shift($tag_tmp);
//$tag_sel = array_shift(explode(' ', $tag));

 


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