Hi out there,
I'd like to know sth about the costs of a function call in php
and the handling of character arrays (init size, enlargement steps of
allocated memory, technique on enlargement -> full copy or virtual
array spread in chunks over mem).
The reason of my question is the following:
// many function calls with smaller char arrays and less concats
echo('wkjksdbjvsdnklvsDVL'.$a.'vfaadf');
echo('wkjksdbdnklvsDVL'.$b.'vfaadf');
echo('wkjksdbjvslvsDVL'.$c.'vdf');
echo('wkjksdbnklvsDVL'.$d.'vfdf');
// single function call with bigger char array and more concat steps
echo('wkjksdbjvsdnklvsDVL'.$a.'vfaadf'
.'wkjksdbdnklvsDVL'.$b.'vfaadf'
.'wkjksdbjvslvsDVL'.$c.'vdf'
.'wkjksdbnklvsDVL'.$d.'vfdf');
So this also arouses the question, wether a function argument that is
passed as literal or expression will be passed by reference or by value?
And does it make any difference, that echo is in fact a language
construct and not a function, though the function-like syntax will be
accepted? http://www.faqts.com/knowledge_base/...l/aid/1/fid/40
says the only difference is, that a boolean return value will be set
by a 'print' function call, while echo does not. But again no details on
implementation of function calls, character arrays or arrays in general.
I tried php.net to find out on these not unimportant implementational
details but unfortunately found nocthing.
TIA
Robert