Re: [PHP4BETA] SYNTAX Q

From: Date: Tue, 11 Apr 2000 17:24:53 +0000
Subject: Re: [PHP4BETA] SYNTAX Q
References: 1 2 3 4 5 6  Groups: php.version4 
Request: Send a blank email to php-version4+get-13403@lists.php.net to get a copy of this message
Hello Teodor Good point! So, the question is this: if the following statement is valid: if(TRUE) ; Then why can't this also be valid: TRUE; Tell you the truth, I don't know the answer! :) May be one of the parser developer can answer this better. Warmest regards, Ly Vuong --- teo@digiro.net wrote: > > 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 > > -- > 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

« previous php.version4 (#13403) next »