Home >Backend Development >PHP Tutorial >I am the Fire Phoenix of Special Forces Episode Episode Introduction to PHP Function Syntax 1
Copy code The code is as follows:
function getAdder($x)
{
return function ($y) use ($x) {
return $x + $y;
};
}
$adder = getAdder(8);
echo $adder(2); // prints "10"
The above has introduced the introduction to the PHP function syntax of I Am the Special Forces Fire Phoenix Episode One, including the introduction to the plot episodes of I Am the Fire Phoenix Special Forces. I hope it will be helpful to friends who are interested in PHP tutorials.