Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren+ 1
what is ++ operator?
i cannot understand $x++
15 Antworten
+ 7
$x++ is same as $x = $x + 1
so it increases the value of $x by one.
+ 4
increment operator
$s++; is same to $s=$s+1;
+ 2
number + 1
+ 2
++ is a incriment operator which means plus 1 value to it
1++ is same as 1+1
+ 2
it is just +1
+ 2
$x++ means value of x is post incremented first and then the next value is stored in memory and on next iteration it prints correct value of it.
+ 2
postfix increment
+ 2
increment operator
i=1
i++ then i=2
+ 1
++ is an increment operator.. the value of the specified function is increased by 1
+ 1
$x=2;
if u write $x++;
it means
$x=$x+1;
it means
$x=2+1;
the second + is 1 by default
+ 1
it is used to increment a variable
$i++; means value of variable i is increased by one
+ 1
increment operator
$s++; is same to $s=$s+1;
+ 1
it is the increment operator
+ 1
Think of the ++ as a cheat code for extra lives in an old nes game. It will add +1 to a variable (your life stock) until it meets the conditions (you forget to turn on gameshark)
0
when $x=10;
$y=50;
$z=30;
echo $z
//what is output come and how