reduce arguments by reference
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.
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.
related to #67
This repository has been closed and moved to laminas/laminas-cache; a new issue has been opened at https://github.com/laminas/laminas-cache/issues/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:
- Squash all commits in your branch (
git rebase -i origin/{branch}) - Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
- Run the laminas/laminas-migration tool on the code.
- Clone laminas/laminas-cache to another directory.
- Copy the files from the second bullet point to the clone of laminas/laminas-cache.
- In your clone of laminas/laminas-cache, commit the files, push to your fork, and open the new PR. We will be providing tooling via laminas/laminas-migration soon to help automate the process.