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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -