+ 2

Explain it.

$x = 5; echo $x; echo "<br />"; echo $x+++$x++; echo "<br />"; echo $x; echo "<br />"; echo $x---$x--; echo "<br />"; echo $x; :: output :: 5 11 7 1 5

3rd Jul 2018, 5:54 PM
Roshan Kr Soni 🇮🇳
Roshan Kr Soni 🇮🇳 - avatar
1 Antwort
+ 3
Here: $x = 5; echo $x; prints 5 echo "<br />"; echo $x+++$x++; $x+++ is 5+5 = 10 $x++ is 10+1 =11 prints 11 echo "<br />"; echo $x; prints 7 echo "<br />"; echo $x---$x--; $x--- is 7-5=2 $x-- is 2-1= 1 prints 1 echo "<br />"; echo $x; prints 5
3rd Jul 2018, 6:17 PM
Agent
Agent - avatar