0

This is dumb but can someone explain why this outputs 10. Im confused

https://code.sololearn.com/wlY8c208NDr6/?ref=app

27th Apr 2017, 10:04 AM
Mashan Shaluka1
Mashan Shaluka1 - avatar
2 Respuestas
+ 7
left is a and right is i: 0+0=0; 0+1=1; 1+2=3; 3+3=6; 6+4=10;
27th Apr 2017, 10:17 AM
Tim G
Tim G - avatar
+ 1
$a is summation of numbers 0 to 4 it's like this code $a = 0 $a = $a + 0 $a = $a + 1 $a = $a + 2 $a = $a + 3 $a = $a + 4 echo $a
27th Apr 2017, 10:23 AM
Saeed Tafazzol
Saeed Tafazzol - avatar