0

Can someone please explain why did the output came out to be ABBC in this question?

echo 'A'. $b='B'; echo 'B'; echo 'C';

24th Mar 2020, 7:27 AM
Palak Gambhir
Palak Gambhir - avatar
1 Answer
+ 2
I just realised that the first line of the code ends in ' . ' & not ' ; ' . Because of the PHP concatenation operator '.', the output was coming out to be ABBC.
24th Mar 2020, 7:52 AM
Palak Gambhir
Palak Gambhir - avatar