Home>Article>Backend Development> php function does not define parameter method
The main content of this article is about the method of php function not defining parameters, which has a certain reference value. Now I share it with everyone. Friends in need can refer to it
'; myfun('aa', 3.4, 5, 6, 7); echo '
'; myfun(); ?>
Result:
78.5
113.04
Number of parameters: 2 array(2) { [0]=> int(1) [1]=> ; string(1) "2" }
Number of parameters: 5 array(5) { [0]=> string(2) "aa" [1]=> float(3.4 ) [2]=> int(5) [3]=> int(6) [4]=> int(7) }
Number of parameters: 0 array(0) { }
Related recommendations:
Detailed explanation of common methods of passing parameters in php
The above is the detailed content of php function does not define parameter method. For more information, please follow other related articles on the PHP Chinese website!