Re: [PHP4BETA] unexpected syntax error in an expression involving the "trim" function
| From: | Andreas Pour | Date: | Wed, 29 Mar 2000 15:19:30 +0000 |
| Subject: | Re: [PHP4BETA] unexpected syntax error in an expression involving the "trim" function | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12805@lists.php.net to get a copy of this message | ||
Hi,
I've also notice that empty only works with variables and not with
expressions. Not clear what to call it -- a bug or lack of feature :-).
Ciao,
Andreas
Jean Flinois wrote:
>
> Hello !
>
> With PHP4 RC1 / Apache 1.3.9 / Linux (module form),
> I get an unexpected syntax error in the following statement :
>
> if (empty(trim($aRow["strUrl"]))) echo $aRow["strTitre"];
> the error is : Parse error: parse error, expecting
T_VARIABLE' or
> '$'' in
> /home/httpd/...
>
> It works if we do this workaround :
>
> $strtemp = trim($aRow["strUrl"]);
> if (empty($strtemp)) echo $aRow["strTitre"];
>
> Maybe a bug? I guessed you'd like to know.
> Rgds,
>
> Jean Flinois <flynn@vtech.fr>
> V-Technologies Savennieres,
> France
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net