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: simple session question [message #175699 is a reply to message #175698] Fri, 21 October 2011 20:14 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/21/2011 4:00 PM, Thomas Mlynarczyk wrote:
> Jonathan Stein schrieb:
>
>> 1) The value of "$_SESSION['stp']++" is calculated. (Result: 0)
>> 2) $_SESSION['stp'] is increased.
>> 3) $_SESSION['stp'] is assigned the previously calculated value (zero).
>
> Ah, thanks for helping me see through this. In other words:
>
> $foo = 0;
> $foo = $foo++;
>
> is basically equivalent to
>
> $foo = 0;
> $tmp = $foo;
> $foo = $foo + 1;
> $foo = $tmp;
>
> although one should probably not rely on that behaviour. This is
> probably a good candidate for an obfuscated code contest.
>
> Greetings,
> Thomas
>
>

The behavior is correct, and can be relied upon 100%.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 28 14:50:08 GMT 2024

Total time taken to generate the page: 0.06279 seconds