PHP 函数(2)

自定义函数:

  

 1 $name = "fakeface";
 2 function dispalyName(){
 3     echo "fakeface";
 4 }
 5 
 6 function returnValue(){
 7     return "fakeface";//返回一个值
 8 }
 9 
10 function takesParameter($name){
11     echo $name; //输出名字
12 }
13 
14 dispalyName();//函数调用
15 returnValue();
16 takesParameter($name);
原文地址:https://www.cnblogs.com/linuxroot/p/3165443.html