+ 2

How the out put is possible

I don't get how the output is coming 3&4 https://code.sololearn.com/w1yqFTu77j5t/?ref=app

1st Nov 2017, 2:19 AM
Christy Alex
Christy Alex - avatar
3 Answers
+ 16
https://www.sololearn.com/Discuss/407846/?ref=app
1st Nov 2017, 2:44 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
To explain the code $a=2; //sets the value of $a to 2 $b=$a++; //sets the value of $b to value of $a, which is 2 //$a is incremented to 3 echo $b; //prints 2, the value of $b
1st Nov 2017, 4:53 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
thanks man
1st Nov 2017, 5:37 AM
Christy Alex
Christy Alex - avatar