昨天写PHP代码时为了方便写了一句if(empty(intval($type)))报错,提示“Can't use function return value in write context”,一时有点晕。就改成$type = intval($type) if(empty($type))最后查PHP手册说明empty()中的参数只能是变量。是否PHP可以改进下。上面这种写法也挺美的吧!
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