Optimization: use strpos instead of strstr when possible, as adviced by PHP manual
|Reported by:||lucaferr||Owned by:|
|Severity:||trivial||Keywords:||strstr strpos optimization|
maybe it's a sort of micro-optimization, but I've noticed that often in the code of Roundcube (for example in rcube_browser.php), to test if a needle occurs within a haystack, strstr is used (and checked against FALSE).
Anyway, the PHP manual recommends to use the faster and less memory intensive strpos function for this purpose.