+ 21

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

10th Aug 2020, 4:47 PM
A͢J
A͢J - avatar
19 ответов
+ 31
There is "." to concatenate the first and the second lines. So, echo 'A'. b='B'; == echo 'A'.b='B'; == echo 'AB';
10th Aug 2020, 4:49 PM
Vladimir (temporary inactive)
Vladimir (temporary inactive) - avatar
+ 28
echo 'A'. $b = 'B'; echo 'B'; echo 'C'; Answer: ABBC because of dot (.) echo 'A'; $b = 'B'; echo 'B'; echo 'C'; Answer: ABC
10th Aug 2020, 4:56 PM
🅢🅗🅐🅡🅞🅕🇺🇿
+ 21
There's a dot (.) between first and second line which concatenates AB and the rest is same.
10th Aug 2020, 4:50 PM
Ozair Khan
Ozair Khan - avatar
+ 16
Been answering this question without understanding. Now I do get it, thanks!
10th Aug 2020, 5:11 PM
david chongo
david chongo - avatar
+ 11
Just a small differences ; is replaced by . That's why answer is ABBC🙃🙂
10th Aug 2020, 4:59 PM
Namit Jain
Namit Jain - avatar
+ 11
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';?>
10th Aug 2020, 5:09 PM
BroFar
BroFar - avatar
+ 10
Vladimir Got it. If there is semicolon then answer will be ABC. Right?
10th Aug 2020, 4:53 PM
A͢J
A͢J - avatar
+ 9
yes , right
10th Aug 2020, 4:56 PM
Vladimir (temporary inactive)
Vladimir (temporary inactive) - avatar
+ 9
Sanjay Kamath look at my examples above ... Thanks
11th Aug 2020, 3:09 AM
BroFar
BroFar - avatar
+ 5
Because the cache memory is cleared when the second echo command is called ....😐
11th Aug 2020, 3:05 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 5
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
12th Aug 2020, 1:00 PM
BroFar
BroFar - avatar
+ 4
AB are concatenated by the .(dot) btwn line 1 and 2
11th Aug 2020, 6:54 AM
Nickson Osiemo
Nickson Osiemo - avatar
+ 4
AJ #L1G3 It's in the dot (.) and semicolon (;). Many viable answers here already... 👌
12th Aug 2020, 9:46 AM
👑 Tchybooxuur!
👑 Tchybooxuur! - avatar
+ 3
Please does anyone know sololearn gmail account
11th Aug 2020, 4:20 PM
Såãsä Géë
Såãsä Géë - avatar
+ 3
Thanks
11th Aug 2020, 4:31 PM
Såãsä Géë
Såãsä Géë - avatar
+ 3
david chongo I totally understand how that works! ☺️😊😂 We all do!
12th Aug 2020, 9:44 AM
👑 Tchybooxuur!
👑 Tchybooxuur! - avatar