5. What is the difference between print() and echo()?
Вариант ответа 1 - A) print() can be used as part of an expression, while echo() can’t
Вариант ответа 2 - B) echo() can be used as part of an expression, while print() can’t
Вариант ответа 3 - C) echo() can be used in the CLI version of PHP, while print() can’t
Вариант ответа 4 - D) print() can be used in the CLI version of PHP, while echo() can’t
Вариант ответа 5 - E) There’s no difference: both functions print out some text!
Комментарий: Even though print() and echo() are essentially interchangeable most of the time, there is a substantial difference between them. While print() behaves like a function with its own return value (although it is a language construct), echo() is actually a language construct that has no return value and cannot, therefore, be used in an expression. Thus, Answer A is correct.