Skip to content

Conversation

@mlocati
Copy link
Member

@mlocati mlocati commented Feb 19, 2016

@mlocati
Copy link
Member Author

mlocati commented Feb 19, 2016

  1. It's safer to replace the chars after having stripped out the encosing '
  2. Let's use the PHP 5.3 way to define the arrays 😉
  3. strtr is faster than str_replace
  4. it's better to use strtr in this case, see the first answer of http://stackoverflow.com/questions/8177296/when-to-use-strtr-vs-str-replace )

@mlocati
Copy link
Member Author

mlocati commented Feb 19, 2016

  1. it's better to use strtr in this case, see the first answer of http://stackoverflow.com/questions/8177296/when-to-use-strtr-vs-str-replace )

A simpler example: https://3v4l.org/O5t0K

oscarotero added a commit that referenced this pull request Feb 19, 2016
@oscarotero oscarotero merged commit 39a29a2 into php-gettext:master Feb 19, 2016
@oscarotero
Copy link
Member

nice!

@mlocati mlocati deleted the fix-phpstring-to-string branch February 19, 2016 08:49
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