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

Prevent using strlen & count on empty input #545

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

stloyd
Copy link
Member

@stloyd stloyd commented Oct 7, 2023

Change Log

Added

Fixed

Changed

  • Prevent using `strlen` & `count` on empty input

Removed

Deprecated

Security


Description

Reference:

#1
Time taken for strict comparison: 0.00032615661621094 seconds
Time taken for count function: 0.00045299530029297 seconds
#2
Time taken for strict comparison: 0.0095489025115967 seconds
Time taken for count function: 0.012413024902344 seconds
#1
Time taken for strict comparison: 0.018247127532959 seconds
Time taken for strlen function: 0.019370079040527 seconds
#2
Time taken for strict comparison: 0.014430046081543 seconds
Time taken for strlen function: 0.023833036422729 seconds

@norberttech norberttech merged commit 4822eb3 into flow-php:1.x Oct 7, 2023
16 checks passed
@stloyd stloyd deleted the optimize-strlen-count branch October 7, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants