On Wed, August 24, 2005 6:10 pm, Jordan Miller wrote:
Is there a technical reason why PHP does not allow comparison
operator expressions like the following:
if (2 $x = 4) {}
2 $x = 4 is a valid expression already.
2 $x is evaluated first, and returns true/false
true/false is compared
Good to know about expression evaluation. Writing the expression(s)
like that (left-to-right and right-to-left) solves my dilemma... thanks!
Jordan
On Aug 25, 2005, at 2:44 AM, Richard Lynch wrote:
I personally would use:
((2 $x) ($x = 4))
--
PHP General Mailing List
General question,
Is there a technical reason why PHP does not allow comparison
operator expressions like the following:
if (2 $x = 4) {}
I prefer this concise way as it is common for mathematics
expressions, and much easier to grasp physically on first glance.
From what I can tell,
Is there a technical reason why PHP does not allow comparison operator
expressions like the following:
if (2 $x = 4) {}
I prefer this concise way as it is common for mathematics expressions, and
much easier to grasp physically on first glance. From what I can tell, this
expression can
4 matches
Mail list logo