re: logical AND assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Robert, how do the results differ from your expectations?
> 
> David

It's hard to wrap my mind around the concept that the assignment
operator itself has an operator precedence.  Which means that one could
write expressions without any assignment at all, and be syntactically
correct.

I cannot believe that the later release of php brought this out, it must
have always been there.  In my case it was evidenced by the subsequent
open a nonexistent file instruction which provided a warning message;
that warning must somehow have been inhibited in the earlier php
installation, so I never knew about my incorrect "and" usage.  It's a
shared database program which has been operational for five years with
no detected bugs.  I actually feel better believing that the newer php
version probably had no effect whatsoever on my code, just a warning
message -- so the code itself is most likely just as solid (or not) as
it ever was.

I do tend to overuse parentheses in my code just for clarity, I slipped
and left them out for the so simple statement A = B and C.  Live and learn!

Thanks,
---Robert

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux