take this example:
foreach(explode(' ','word1 word2 word3') as $v)
echo $v;
From what I know php doens't execute every time the explode function, but it will be executed only the first time.
Is this true? And is this true even for user-defined functions?
Is that code better than this or it's equal?
$genericVar = explode(' ','word1 word2 word3');
foreach($genericVar as $v)
echo $v;
thanks