Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Optimize userName and domainWord #729

Merged
merged 1 commit into from
Oct 6, 2015

Conversation

vlakoff
Copy link
Contributor

@vlakoff vlakoff commented Oct 5, 2015

My apologies for the amount of PRs! (and there is one more to come after)

Something I forgot when moving from #723 to #725.
transliterate() result is surely ascii compatible[1]. And in any hypothetical worst-case scenario (like user messing low level), mb_strtolower() wouldn't fix anything anyways, but make upfront bug less noticeable.

The contract is clear: transliterate() result is ascii compatible. And with this commit we save 2 function calls each time, which is great.

[1] return preg_replace('/[^A-Za-z0-9_.]/u', '', $transString);

fzaninotto added a commit that referenced this pull request Oct 6, 2015
Optimize userName and domainWord
@fzaninotto fzaninotto merged commit 5c3fa24 into fzaninotto:master Oct 6, 2015
@fzaninotto
Copy link
Owner

Thanks!

@vlakoff vlakoff deleted the provider-internet branch October 12, 2015 20:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants