zend-cache icon indicating copy to clipboard operation
zend-cache copied to clipboard

reduce arguments by reference

Open marc-mabe opened this issue 10 years ago • 6 comments

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.

marc-mabe avatar Jun 13 '15 13:06 marc-mabe

I'll suggest to open a issue for each idea so we could discuss over each one separately.

Maks3w avatar Jun 13 '15 13:06 Maks3w

@Maks3w I have changed the title and description on this PR. Will open new for the other ideas.

marc-mabe avatar Jun 13 '15 20:06 marc-mabe

@marc-mabe Thanks. Tiny objectives make it more easy to be approved and merged.

Maks3w avatar Jun 13 '15 21:06 Maks3w

related to #67

marc-mabe avatar Mar 24 '16 19:03 marc-mabe

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.

weierophinney avatar Dec 31 '19 21:12 weierophinney

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.

weierophinney avatar Dec 31 '19 21:12 weierophinney