Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ref] Remove reference symbol from 2 variables #14270

Merged
merged 1 commit into from
May 20, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor readability fix

Before

Variables passed by reference

After

Variables not passed by reference

Technical Details

I checked & these are not altered in the function - so passing by reference only adds confusion

Comments

I checked & these are not altered in the function - so no need
@civibot
Copy link

civibot bot commented May 20, 2019

(Standard links)

@civibot civibot bot added the master label May 20, 2019
@colemanw
Copy link
Member

Once upon a time there was a theory that php4 performed some fraction of a microsecond faster if you passed variables by reference because it didn't have to make a copy of them. Whether or not that was ever true, it resulted in some confusing code which serves as a lesson today to leave micro-optimizations up to the compiler.

@colemanw colemanw merged commit d5fa29e into civicrm:master May 20, 2019
@colemanw colemanw deleted the dedupe branch May 20, 2019 12:49
@eileenmcnaughton
Copy link
Contributor Author

@colemanw yeah Xavier researched & debunked than around 2011..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants