php - Why does this causes an error? -
this question has answer here:
i have codeline....
define('csv_textsign', ''); $var = ( empty( trim( csv_textsign ) ) ? '"' : csv_textsign );
this causes error
fatal error: can't use function return value in write context in... line xx
but there valid functions...
bool empty ( mixed $var ) string trim ( string $str [, string $charlist ] )
i tried switch " ' in define , use vars instead of constants
am blind ? can explain me whats going wrong ?
from http://php.net/empty
prior php 5.5, empty() supports variables; else result in parse error. in other words, following not work: empty(trim($name)). instead, use trim($name) == false.
Comments
Post a Comment