Hi Rowan, On Fri, Dec 5, 2014 at 6:12 PM, Rowan Collins <rowan.coll...@gmail.com> wrote:
> The author of function f1() presumably designed it to apply some change to > $v, rather than executing only for its side effects and return value. If > the caller wants to ignore this design, they can, but they are not using > the function as it was designed. If they pass a function return straight > into it, they have no way of capturing the change to $v which the author > intended them to see. The value supplied to f1() is return value. In languages, there are literal, constant and variable. Return value is variable. It's better to keep basic rule. IMHO. $top = array_pop(f2()); is better than $v = f2(); $top = array_pop($v); Is there anyone who likes latter? Are there any other languages behave like PHP? Regards, -- Yasuo Ohgaki yohg...@ohgaki.net