Use of phpreturn

Source: Internet
Author: User
: This article mainly introduces the use of phpreturn. For more information about PHP tutorials, see. Today, the technical manager suddenly asked me to write a php script to query and judge and return data. after finally finding the data, how can I return it?

Because I did not encapsulate the function into a function, I felt that I could not use the return; and then I queried it:

My personal summary: (1) return is mainly used in functions. its main function is to return the results, resources, and parameters of function processing to the call location.

(2)

Basic usage:

A) return expression // return an expression result

B), return (expr) // function expression

C), return // directly return, or return a null value

Note: it is best not to use return ($ val.


The above introduces the use of php return, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.