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

相关文章:

  • 2021-11-30
  • 2022-01-27
  • 2021-08-08
  • 2021-12-18
  • 2022-12-23
  • 2021-07-13
  • 2021-07-03
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-07-07
  • 2021-10-12
  • 2022-12-23
  • 2021-10-20
相关资源
相似解决方案