Re: php compiler
| From: | Klaus Reimer | Date: | Sat, 30 Oct 2004 14:25:52 +0000 |
| Subject: | Re: php compiler | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200719@lists.php.net to get a copy of this message | ||
Hodicska Gergely wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
It outputs this: false bool(false) int(0) Yes, this the right output.I don't see the problem. The behaviour of your code matches the precendences in my opinion: $a = 1 && $b = 0 PHP sees two expressions here: $a = 1 && $b (because && has higher priority than =) and $b = 0; So the condition resolves to "1 && 0" while $a is set to false and $b is set to 0; So where is the problem? -- Bye, K <http://www.ailis.de/~k/> (FidoNet: 2:240/2188.18) [A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391] (Finger k@ailis.de to get public key)And this output is absolutely correct. Your condition gives new values to $a and $b because you use "=" and not "==". So you do this:Maybe you never read this: http://hu2.php.net/manual/en/language.operators.php#language.operators.precedence The result is not so obvious. There sould some internal behavior which cause this.
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc