0

What's b value

$a=2 ; $b=$a++; Guys what is the answer of b

21st May 2020, 2:24 PM
Kumaresan
4 Réponses
+ 1
That is because of post increment. Value of $a will be stored in $b and then it will increment. But if you use pre increment then it's a different story. Try this : $a = 2; $b = ++$a; echo $b;
21st May 2020, 2:33 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
But b answer show 2 ....how 🤔
21st May 2020, 2:25 PM
Kumaresan
0
Sir answer 3 ...
21st May 2020, 2:42 PM
Kumaresan
0
Sir variable declare after the addition do not do it
21st May 2020, 2:45 PM
Kumaresan
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes