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

Cast integer with (int) over intval for speed #1907

Merged
merged 1 commit into from Dec 28, 2015

Conversation

Projects
None yet
3 participants
@wpsmith
Contributor

wpsmith commented Dec 28, 2015

While probably negligible, casting the integer (int) is faster than using intval(). Just an idea.

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Dec 28, 2015

Member

casting the integer (int) is faster than using intval()

Can you point to data that supports this?

Member

danielbachhuber commented Dec 28, 2015

casting the integer (int) is faster than using intval()

Can you point to data that supports this?

@wpsmithtwc

This comment has been minimized.

Show comment
Hide comment
Contributor

wpsmithtwc commented Dec 28, 2015

@danielbachhuber danielbachhuber added this to the 2.0 Beta 10 milestone Dec 28, 2015

danielbachhuber added a commit that referenced this pull request Dec 28, 2015

Merge pull request #1907 from wpsmith/feature/cast_integer_sanitize
Cast integer with (int) over intval for speed

@danielbachhuber danielbachhuber merged commit e0f239e into WP-API:develop Dec 28, 2015

3 checks passed

Scrutinizer 1 new issues
Details
codecov/project 93.09% (target 80.00%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Dec 28, 2015

Member

Thanks!

Member

danielbachhuber commented Dec 28, 2015

Thanks!

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