Re: $i++ problem understanding
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: $i++ problem understanding

From: Oli Filth <catch@olifilth.co.uk>
Date: Wed Oct 05 2005 - 13:05:27 CEST

lain said the following on 05/10/2005 11:04:
> Pugi! wrote:
>
>>Currently I am studying PHP.
>>
>>I can understand the following :
>>$a = 10;
>>$b = $a++;
>>print("$a, $b");
>>will print 11, 10 on the screen.
>
>
> just wrong.
> what happens is:
> $b = $a;
> $a++;

Yup.

> so the above example actually will print ("10, 10").

Nope :)

-- 
Oli
Received on Tue Oct 18 02:32:11 2005