Re: [PHP4BETA] SYNTAX Q

From: Date: Tue, 11 Apr 2000 16:30:55 +0000
Subject: Re: [PHP4BETA] SYNTAX Q
References: 1 2 3 4 5  Groups: php.version4 
Request: Send a blank email to php-version4+get-13395@lists.php.net to get a copy of this message
Hi Anh! On Tue, 11 Apr 2000, Anh (Ly) Vuong wrote: > Hello Teodor, > > I have not verify the statement, but I believe the parse error is due > to it's missing the 'if' keyword? > > if( (trim($v) == '') && unset($array[$k]) ) > ; > I was thinking of side effects. it's an expression , and AFAIK in PHP we can have a stamement like ``true;'' also, due to how logical expr. are evaluated I would expect `` (trim($v) == '') && unset ($array[$k]); '' to trigger unset() only when the left expression is true. So, if `` true;'' is valid, why wouldn't the above expression be valid too? -- teodor

« previous php.version4 (#13395) next »