Improve performance of if key exists in the array #235

Merged
merged 1 commit into from Dec 18, 2012

Conversation

Projects
None yet
5 participants
@doctrinebot

This comment has been minimized.

Show comment Hide comment
@doctrinebot

doctrinebot Dec 17, 2012

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DCOM-153

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DCOM-153

guilhermeblanco added a commit that referenced this pull request Dec 18, 2012

Merge pull request #235 from basico/master
Improve performance of if key exists in the array

@guilhermeblanco guilhermeblanco merged commit a890fe1 into doctrine:master Dec 18, 2012

1 check passed

default The Travis build passed
Details
@fruit

This comment has been minimized.

Show comment Hide comment
@fruit

fruit Jan 8, 2013

Contributor

IMHO, the better way is to reuse here containsKey method:

if ($this->containsKey($key)) { ... }

@Basico, why you want to check with the isset first - performance reasons?

IMHO, the better way is to reuse here containsKey method:

if ($this->containsKey($key)) { ... }

@Basico, why you want to check with the isset first - performance reasons?

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Jan 8, 2013

Member

Would be much more overhead

Member

Ocramius replied Jan 8, 2013

Would be much more overhead

This comment has been minimized.

Show comment Hide comment
@jfcalcerrada

jfcalcerrada Jan 8, 2013

Contributor

Yes, I add two links related about that in the pull request #235

Contributor

jfcalcerrada replied Jan 8, 2013

Yes, I add two links related about that in the pull request #235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment