I was wondering if a user defined function will always needs a return() statement and if not when is a return() statement not required?
3条回答 默认 最新
- duanguochong0397 2011-08-31 10:47关注
It doesn't. It's only required if you want to use it.
From http://www.php.net/manual/en/functions.returning-values.php:
Values are returned by using the optional return statement.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报