1. a UDF is a code block that can be executed when needed. Function declaration: all functions use the keyword & quot; function () & quot; to start naming functions. the function name should prompt its function. The function name must start with a letter or underscore. Add & quot; {& quot; 1. a UDF is a code block that can be executed when needed. Function declaration: all functions use the keyword "function ()" to start naming the function. the function name should prompt its function. The function name must start with a letter or underscore. Add "{"-the section after the opening curly braces is the function code. Insert the function code to add a "}"-the function ends by closing curly braces. Example: [php] 2. function-adding parameters our first function is a very simple function. It can only output one static string. You can add parameters to add more functions to the function. The parameter is similar to a variable. Example: [php] ";}Echo" My name is "; writeMyName (" lin "); echo" My name is "; writeMyName (" kobe "); echo" My name is "; writeMyName ("John");?>3. function-return value functions can also be used to return values. [Php] Output of the above code: 4 + 26 = 30
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