Strict Standards php error

后端 未结 3 2005
甜味超标
甜味超标 2021-01-26 18:27

I have a small issue with my script.

I\'m getting Strict Standards: Only variables should be passed by reference in

if( $checkDNS && ($domain = e         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-26 19:17

    Like the message says, end expects a variable because its parameter is a reference.

    But since PHP 5.4 you can dereference arrays like that:

    $domain = explode('@',$email, 2)[1];
    

    Assuming that $email always contains @. You should assure that beforehand, otherwise end(...) would give you unexpected results too.

提交回复
热议问题