What is the output of this code? $world = ‘world’; echo <<<‘TEXT’ hello $world TEXT;
A. hello $world
B. PHP Parser error
C. hello world
2 Comments on “What is the output of this code?”
ruslanbessays:
Terrible question. It’s kinda depends on whether there is a newline in the end or not.
If there is, A is correct: https://eval.in/563173
, if there isn’t B is correct: https://eval.in/563180
Terrible question. It’s kinda depends on whether there is a newline in the end or not.
If there is, A is correct: https://eval.in/563173
, if there isn’t B is correct: https://eval.in/563180
3
0
Do you have a explanation about the issue above?
1
0