search

Home  >  Q&A  >  body text

What is the difference between return and ECHO in a method?

What is the difference between return and ECHO in the method?

子寒子寒2394 days ago1276

reply all(2)I'll reply

  • 三宝

    三宝2018-05-08 10:52:28

    return is the value of the returned result and terminates the code, echo is the output string value, this is the output displayed on the page, the value that can be seen

    reply
    0
  • oswell

    oswell2018-05-07 08:19:00

    return is the execution result of the returned function,

    echo is the output (printing)

    reply
    0
  • Cancelreply