Skip to content

refactoring #1

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

Closed
wants to merge 1 commit into from
Closed

Conversation

githubjeka
Copy link

@lennartvdd
Copy link
Owner

I like the cleanliness of your method, but I would definately keep naming the last param $defaultOperator instead of just $operator since it's more descriptive and less likely to cause confusion about the intended purpose.

The regex in the original method is more efficient since it only has to ever scan the first 2 chars at most. Even though it's a micro optimisation, the original method is about 40% faster than your version, so I think we should leave it as is.

@lennartvdd lennartvdd closed this May 27, 2015
lennartvdd pushed a commit that referenced this pull request Jul 3, 2015
@githubjeka githubjeka deleted the queryCompare branch April 11, 2016 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants