-
Notifications
You must be signed in to change notification settings - Fork 53
reduce arguments by reference #8
base: develop
Are you sure you want to change the base?
reduce arguments by reference #8
Conversation
I'll suggest to open a issue for each idea so we could discuss over each one separately. |
@Maks3w I have changed the title and description on this PR. Will open new for the other ideas. |
@marc-mabe Thanks. Tiny objectives make it more easy to be approved and merged. |
$this->normalizeKeyValuePairs($keyValuePairs); | ||
$args = new ArrayObject([ | ||
$keyValuePairs = $this->normalizeKeyValuePairs($keyValuePairs); | ||
$args = new ArrayObject([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @weierophinney Is this the kind of cosmetic changes you want?
related to #67 |
This repository has been closed and moved to laminas/laminas-cache; a new issue has been opened at laminas/laminas-cache#14. |
This repository has been moved to laminas/laminas-cache. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
|
This PR reduces arguments by reference often used on internal methods.
It was previously done as performance improvement but in fact it decreases performance as PHP have to create a new zval and in some cases it needs to copy the value before PHP-7 as described here: http://nikic.github.io/2015/05/05/Internal-value-representation-in-PHP-7-part-1.html
Additionally arguments by reference make the code more error prone and hard to read.