Prev: Multiple Login in a single PC should not be possible
Next: PHP list posting confirmation for VICKI.STANFIELD.CTR@DFAS.MIL
From: David Harkness on 10 Sep 2010 13:54 On Fri, Sep 10, 2010 at 8:22 AM, Robert E. Glaser <php(a)icengineering.com>wrote: > 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. > You do this all the time without realizing it! echo "Hello, " . $name; $rect->setTopLeft(new Point(5 * 3, 2 / 3)); These expressions are eventually assigned to function parameters or passed to the PHP engine in the case of echo, but there are no assignment operators present. And all of the control structures--if, while, for, etc.--take expressions. Expressions are all around us. You can feel them when you go to work . . . when you go to church . . . when you pay your taxes. No wait, that's the Matrix. David
From: "=?utf-8?B?YXNoQGFzaGxleXNoZXJpZGFuLmNvLnVr?=" on 10 Sep 2010 14:05
Stay off those red pills David! Thanks, Ash http://www.ashleysheridan.co.uk ----- Reply message ----- From: "David Harkness" <david.h(a)highgearmedia.com> Date: Fri, Sep 10, 2010 18:54 Subject: [PHP] re: logical AND assignments To: "Robert E. Glaser" <php(a)icengineering.com> Cc: <php-general(a)lists.php.net> On Fri, Sep 10, 2010 at 8:22 AM, Robert E. Glaser <php(a)icengineering.com>wrote: > 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. > You do this all the time without realizing it! echo "Hello, " . $name; $rect->setTopLeft(new Point(5 * 3, 2 / 3)); These expressions are eventually assigned to function parameters or passed to the PHP engine in the case of echo, but there are no assignment operators present. And all of the control structures--if, while, for, etc.--take expressions. Expressions are all around us. You can feel them when you go to work . . . when you go to church . . . when you pay your taxes. No wait, that's the Matrix. David |