Home > Article > Backend Development > Return value of php function_PHP tutorial
Return value of php function. In fact, the PHP function can return one or more values, and the return keyword can be used to return a variable or an array. return causes the program to stop at return and return the specified variable.
Let’s give an example today:
The code is as follows
|
Copy code
|
||||||||
';
{ return $shu+1; } echo add(2).' ‘; function she($a,$b,$c) { return array($c,$b,$a); } list($x,$y,$z)=she(2,3,4); echo ‘$x=’.$x.’ $y=’.$y.’ $z=’.$z; ?> php letter
|