Skip to content

Conversation

usox
Copy link
Contributor

@usox usox commented Dec 10, 2019

Hi

Array and string offset access syntax with curly braces is deprecated in php 7.4 so I replaced it by strpos calls.
I also optimized the OptionTest a bit

Copy link
Owner

@splitbrain splitbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe, simply replacing the curly brackets with square brackets is faster than strpos. (I realize that this is a micro-optimization)

@usox
Copy link
Contributor Author

usox commented Dec 11, 2019

Hi

I believe, simply replacing the curly brackets with square brackets is faster than strpos.

I think so, too - it was my first approach. But I guess there are many people out there who don't know about the array-like access to char positions in a string, so I chose strpos.
If you prefer the array-like access, I will change the PR accordingly.

@usox
Copy link
Contributor Author

usox commented Dec 12, 2019

Done

@splitbrain splitbrain merged commit fb4f888 into splitbrain:master Dec 12, 2019
@splitbrain
Copy link
Owner

thanks

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