DEV Community

loading...

Discussion on: 4 PHP Tricks to Boost Script Performance

Collapse
backendtea profile image
Gert de Pagter

For what its worth, ctype_ functions are locale aware, and may produce slightly different results based on the locale. While preg_match is not locale aware.

Collapse
devmount profile image
Andreas Author

Thank you for this addition! I couldn't find something in the docs about the locales, do you have an example?

Collapse
backendtea profile image
Gert de Pagter

It is mentioned in the introduction on ctype php.net/manual/en/intro.ctype.php

Thread Thread
devmount profile image
Andreas Author

Ah thanks 😊