Use strpos() instead of strstr() where appropriate
|Reported by:||rob1n||Owned by:||rob1n|
According to the PHP manual page, strpos() is "faster and less memory intensive" (http://us2.php.net/strstr) than strstr() if you just want to know whether a string contains another string.
After talking with Ryan, I made a patch that changes every strstr() call to a strpos() (*except* where appropriate for strstr()).
Change History (9)
- Keywords has-patch added
- Status changed from new to assigned
- Type changed from defect to enhancement
comment:3 @johnbillion — 9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened