+ 14

Please explain me the output of this code.

This code gives strange output. The only difference between the last two lines is in using quotes. Why is it so? https://code.sololearn.com/wy5K43olzruM/?ref=app

21st Jul 2020, 7:58 AM
Dual Core
Dual Core - avatar
3 Answers
+ 1
The multi quotes looks on variables and normal characters, the single quotes are for char to char output.
21st Jul 2020, 8:03 AM
Maromon Lupus
Maromon Lupus - avatar
+ 1
The text in echo statement should be in single or double quotation marks.
21st Jul 2020, 8:08 AM
JaScript
JaScript - avatar
+ 1
php echo consider $ as variable initiator inside double quotes and consider $ as contant literal/a constant letter inside single qoutes.
21st Jul 2020, 10:00 AM
Divya Mohan
Divya Mohan - avatar