When developping a module, we often use some commonly used PHP functions. As you may not know Drupal provides some overrides for these functions. They are often related to strings, they have the same name as their PHP native equivalent except that they are prefixed with drupal_. Here is a list of PHP functions you should replace with its Drupal equivalent:
- Replace
strlen()withdrupal_strlen() - Replace
strtoupper()withdrupal_strtoupper() - Replace
strtolower()withdrupal_strtolower() - Replace
ucfirst()withdrupal_ucfirst() - Replace
substr()withdrupal_substr() - Replace
eval()withdrupal_eval() - Replace
clonewithdrupal_clone()
For more on this, you should read includes/unicode.inc and includes/common.inc.