PHP development encounters error reporting

 

Can't use function return value in write context

By locating the code line, it is found that this is actually an error reported by the empty() function of php. After PHP 5.5, the empty function parameter must be variable (variable), not the return value of other functions, including str_replace, trim, etc.

So just assign the function inside to a variable, and then use empty (variable) to judge. Friends who used to use PHP5.3 should not encounter this kind of error.

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324983285&siteId=291194637