FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » simple session question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: OT: and even in Dart .........Re: simple session question [message #175747 is a reply to message #175735] Sun, 23 October 2011 07:40 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Thomas Mlynarczyk wrote:
> The Natural Philosopher schrieb:
>
>> The point is that bracketing is supposed to absolutely ensure that
>> nothing outside gets done till the inside is complete.
>
> And that's exactly what happens:
>
> // $foo = 0;
> [1] Evaluate 0 // result: 0
> [2] Assign result of [1] to $foo // $foo = 0
> // $foo = ($foo++);
> [3] Evaluate operation "post-increment" on $foo // ($foo++)
> [3.1] Set return value to current $foo // result: 0

Why would one do that..what 'return value' is that...

You are making the side effect of lower precedence than the bracket.
That is NEVER done.


> [3.2] Add 1 to $foo // $foo = 1
> [3.3] Return result // 0
> [4] Assign result of [3] to $foo // $foo = 0
>
> Thus, for a few nanoseconds, $foo is indeed 1, until this increment is
> undone in [4] by reassigning $foo its old value.
>
>> So $a=($foo++); should be the same as
>> $foo++;
>> $a=$foo;
>
> No. That would be $a = ++$foo.
>
> Greetings,
> Thomas
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: session cookie: client side
Next Topic: by get this format my explode file name like this through php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 22:28:57 GMT 2024

Total time taken to generate the page: 0.05021 seconds