Date: 08/15/00
- Next message: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6150 Updated: Server Hangup when LDAP and mysql both compiled in"
- In reply to: Oded Arbel: "[PHP-DEV] PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Next in thread: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Reply: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 06:38 PM 8/15/00 +0200, Oded Arbel wrote:
>OK, you are right - according to the manual, I should have used the
>logical operator 'and' instead of '&&' .
>I still think that this is wrong though, and misleading - high level
>programming languages always set the logical operators (no matter how they
>are named) as lower precedence then assignment operators (actually, the
>lowest),
Hmmm... my reference books are at home, but I seem to remember that this is
not the case for C or for Perl
> and if you want a different behaviour then you use parenthesis.
Parenthesis are almost always a good idea. They keep you from being
dependant on quirks with compilers and help make your code more maintainable.
>I'd hate to sound like a conformist or something, but this is damaging to
>people who start programming in PHP after doing a lot of high level
>programming in other languages. (and it was different in PHP3 ;-)
A large base of PHP users come from perl and C.
>Oded
>
>P.S.
>sorry this is going by email - I can't remember my password to the PHP bug
>database. I hope you won't get mad at me.
No worries :)
- Zak
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6150 Updated: Server Hangup when LDAP and mysql both compiled in"
- In reply to: Oded Arbel: "[PHP-DEV] PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Next in thread: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Reply: Joey Smith: "Re: [PHP-DEV] Re: PHP 4.0 Bug #4037 Updated: improper parsing of logical statements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

