On Wed, Sep 8, 2010 at 9:55 AM, Peter Lind wrote:
> || and && would work exactly like 'or' and 'and' in the above. ==, !=,
> === and !=== have higher precedence than || or &&
>
Ah, you're correct. The only operators between &&/|| and and/or and the
ternary ?: and assignment operators. Thus the n
The reason for "and" to have such a low precedence is so you can use it to
perform conditional processing. You can probably achieve every effect using
"&&", but you'd need more parentheses. More typically you would use "or" in
this fashion:
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
On Tue, Sep 07, 2010 at 10:41:46PM -0400, Robert E. Glaser wrote:
> My ISP upgraded his server from Ubuntu 9.04 to Ubuntu 9.10, which
> probably included a newer PHP version. I don't know what PHP version
> was on previously. Code I've had running for years broke, and I tracked
> it down to this
My ISP upgraded his server from Ubuntu 9.04 to Ubuntu 9.10, which
probably included a newer PHP version. I don't know what PHP version
was on previously. Code I've had running for years broke, and I tracked
it down to this equivalent:
";
$Condition0 = true and false;
If ($Condition0)
ec
4 matches
Mail list logo