How the answer is ABBC? | SoloLearn: Learn to code for FREE!

+19

# How the answer is ABBC?

It's a challenge question and I didn't get how it works? See the below screenshot. https://www.sololearn.com/post/489622/?ref=app

8/10/2020 4:47:56 PM

AJ #👋👋👋👋👋

19 Answers

New Answer

+28

There is "." to concatenate the first and the second lines. So, echo 'A'. b='B'; == echo 'A'.b='B'; == echo 'AB';

+23

echo 'A'. \$b = 'B'; echo 'B'; echo 'C'; Answer: ABBC because of dot (.) echo 'A'; \$b = 'B'; echo 'B'; echo 'C'; Answer: ABC

+18

There's a dot (.) between first and second line which concatenates AB and the rest is same.

+16

Yes, AJ #L1G3 the answer will be ABC if there is semicolon.

+16

Been answering this question without understanding. Now I do get it, thanks!

+16

david chongo 😅😂😂

+11

Just a small differences ; is replaced by . That's why answer is ABBC🙃🙂

+10

Vladimir Got it. If there is semicolon then answer will be ABC. Right?

+10

AJ #L1G3 both of these are the same... <?php echo 'A'. /* did you see the period */ \$b = 'B'; echo 'B'; echo 'C'; ?> <?='A'.\$b='B'.'B'.'C';?>

+10

Såãsä Géë If you have any queries.. send email on "[email protected]"

+9

yes , right

+9

Sanjay Kamath look at my examples above ... Thanks

+4

Because the cache memory is cleared when the second echo command is called ....😐

+4

AJ #L1G3 It's in the dot (.) and semicolon (;). Many viable answers here already... 👌

+4

UTKARSH SANGAL and Tony Mark please do not spam threads as this takes away from the quality of the thread and provides no relevant information to those needing help. Thanks and happy coding. https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app

+3

AB are concatenated by the .(dot) btwn line 1 and 2

+3

david chongo I totally understand how that works! ☺️😊😂 We all do!

+2

Please does anyone know sololearn gmail account

+2

Thanks