Php function return value. in fact, the php function can return one or more values. you can use the return keyword to return a variable or an array. return will stop the program at return and return the specified variable. let's take an example today: the instance code... php function return value. in fact, the php function can return one or more values. you can use the return keyword to return a variable or an array. return will stop the program at return and return the specified variable. let's take an example today:
The instance code is as follows:
The execution result is as follows:
Php function, how to return multiple return values? (the function cannot return multiple values, but you can return an array to obtain similar results .)
The instance code is as follows:
Output result:
Array ( [0] => The quick brown fox jump over the lazy dog [1] => THE QUICK BROWN FOX JUMP OVER THE LAZY DOG [2] => the quick brown fox jump over the lazy dog [3] => The Quick Brown Fox Jump Over The Lazy Dog )
Reference: This function returns three values. one is the function return and the other two are referenced.
The instance code is as follows:
Address:
Reprinted at will, but please attach the article address :-)