+ 3

Does PHP support value returning functions ?

7th Jan 2017, 8:53 PM
mirza arslan
mirza arslan - avatar
4 Respostas
+ 7
Yes, PHP supports a return type which is a function. PHP is very flexible in fact of return types. It is also possible to return multiple values. function sendData($user, $pass, $host){ return function() use ($user, $pass, $host){ return array($user, $pass, $host); }; }
7th Jan 2017, 8:58 PM
Manuel Wiltz
Manuel Wiltz - avatar
+ 1
thank you . @Manuel
7th Jan 2017, 8:59 PM
mirza arslan
mirza arslan - avatar
0
Yes
5th Feb 2017, 6:41 PM
Amir Savadi
Amir Savadi - avatar
0
Yes
27th Feb 2017, 6:03 PM
Amir Savadi
Amir Savadi - avatar