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

code optimizations accepted? #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TheDigitalOrchard
Copy link

@TheDigitalOrchard TheDigitalOrchard commented Jun 29, 2024

Do you accept pull requests? I know this library hasn't been updated in 11 years, but it has great potential and I'd like to see it maintained to the latest PHP standards.

Since performance is one of the motivating goals, I wanted to offer up the following optimizations:

  • switch to [] array syntax everywhere (cleaner, modern syntax)
  • use single-quotes when parsing not needed
  • add REGEX_TAG constant to avoid recreating variable each time function runs
  • use parsed strings instead of concatenation where parsing is already in play.

There is no functional difference with this PR, only syntax cleanup.

… add REGEX_TAG constant to avoid recreating variable each time function runs
@TheDigitalOrchard TheDigitalOrchard changed the title code optimazitions accepted code optimizations accepted Jun 29, 2024
@TheDigitalOrchard TheDigitalOrchard changed the title code optimizations accepted code optimizations accepted? Jun 29, 2024
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.

1 participant