Consider the following php segment code:-
<?php
#Part-1
$a = 1;
$c = $a + $a++;
echo $c;
#Part-2
$a = 1;
@ $c = $a + $a++;
echo $c;
#Part-3
$a = 1;
$c = $a + $a + $a++;
echo $c;
#Part-4
$a = 1;
@ $c = $a + $a + $a++;
echo $c;
?>
The output of the above code segment is:
3233
Now my questions is following:-
1. How output is 3233 - explain breafly?
2. And what is the role of @ sign in the code segment?
3. If Part-1 code segment output is 3 but how Part-3 code segment output 3?