I'm trying to reduce the warnings that are sent to my apache server log.
One warning is:
Call-time pass-by-reference has been deprecated.
It is hard for me to imagine why this was deprecated since it is such a useful programming feature, basically I do this:
public function takeScriptsWithMarker(&$lines, $marker) {
...
}
and I call this function repeatedly getting results back from it and processing them but also letting the array $lines build up by being sent into this method repeatedly.
- To reprogram this would be extensive.
- I don't want to just "turn off warnings" since I want to see other warnings.
So, as call-by-reference is deprecated, what is the "accepted way" to attain the functionality of this pattern: namely of sending an array of strings into a method, have them be changed by the method, then continuing to use that array?