What is the difference between echo and die() or are they same? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between echo and die() or are they same?

25th Sep 2017, 6:09 AM
VJ46
VJ46 - avatar
1 Answer
+ 1
The die() function can accept an optional argument string that it will output just before terminating the script. echo() only outputs its arguments, it will not terminate the script.
25th Sep 2017, 6:47 AM
Ipang