For a public app – do you think it’s a good idea to assume the mb_string extension is enabled on all servers (or almost all, like 95%)?
Are there hosts out there that disable this extension?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think most have it enabled by default but I’ve known a few hosting providers that don’t, and who also then refused to enable it (never did get a good reason out of them).
If you want all users to be able to install the app on their server without any changes then you’ll probably want to roll your own set of functions.
However it might be a better solution to make
mb_stringa pre-requisite of your app (and perhaps test for it’s existence in the installation script) then you’d be able to save yourself that extra work, while still providing a satisfactory user experience.If you take Drupal as an example of a public app, they actually roll their own functions (e.g.
drupal_substr()anddrupal_strlen()), in which they test for the existence of themb_stringextension and make the decision on how to run the function based on that.