Joined March 2012
·
Achievements
129 Karma
2,447 Total ProTip Views
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Kona
Have at least one original repo where CoffeeScript is the dominant language
Forked
Have a project valued enough to be forked by someone else
Nephila Komaci 3
Have at least three original repos where PHP is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Raven
Have at least one original repo where some form of shell script is the dominant language
Charity
Fork and commit to someone's open source project in need
Good job on highlighting the necessity of the mb_* extensions for handling UTF-8 strings. However I disagree with your second assertion, the best way to compare string length in PHP is the obvious way. By making a micro-optimisation such as this early, you lose a communicative aspect to your code.
What if I want to check if a string is greater than 6? Then I am back to using
mb_strlen
.These cases should only be targeted for optimisation when actually needed, by taking this practice into common use you may lose more than you gain.