Skip to content

code optimizations accepted?#12

Open
TheDigitalOrchard wants to merge 2 commits intoSkylarKelty:masterfrom
TheDigitalOrchard:code-optimizations
Open

code optimizations accepted?#12
TheDigitalOrchard wants to merge 2 commits intoSkylarKelty:masterfrom
TheDigitalOrchard:code-optimizations

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