Small question about performance

From: Date: Thu, 15 Mar 2012 14:21:19 +0000
Subject: Small question about performance
Groups: php.internals 
Request: Send a blank email to internals+get-58957@lists.php.net to get a copy of this message
Hello internals, I've been involved in a discussion at the PHP Standards Group and we recently had the following statement: *Say you had a loop, and inside that loop you wanted to modify a param > **update the key:** > **foreach($a as $key => $val) { > ** $a[$key] = someLong(functionCalls(hereThat($spanOver85Chars))); > **}** > **If this exceeded the line width, you would have to split things like > **this over a few lines, storing the val temporarily in a zval's until > **you reached your end computation. Therefore allocating more memory > **iteratively. * I'm curious about this. Can anyone confirm it or a benchmark should be made?

« previous php.internals (#58957) next »