FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ensure php7.4 compatibility by usox · Pull Request #16 · splitbrain/php-cli · GitHub

Ensure php7.4 compatibility - #16

Merged
splitbrain merged 1 commit into
splitbrain:masterfrom
usox:php74-compat
Dec 12, 2019
Merged

Ensure php7.4 compatibility#16
splitbrain merged 1 commit into
splitbrain:masterfrom
usox:php74-compat

Conversation

usox commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

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

splitbrain left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

usox commented Dec 11, 2019

Copy link
Copy Markdown
Contributor Author

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 commented Dec 12, 2019

Copy link
Copy Markdown
Contributor Author

Done

splitbrain merged commit fb4f888 into splitbrain:master Dec 12, 2019

Copy link
Copy Markdown
Owner

thanks

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL