Opened 19 months ago
Closed 19 months ago
#1488211 closed Bugs (fixed)
Optimization: use strpos instead of strstr when possible, as adviced by PHP manual
| Reported by: | lucaferr | Owned by: | |
|---|---|---|---|
| Priority: | 9 | Milestone: | 0.7-stable |
| Component: | Core functionality | Version: | 0.6 |
| Severity: | trivial | Keywords: | strstr strpos optimization |
| Cc: |
Description
Hello,
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.
Change History (1)
comment:1 Changed 19 months ago by alec
- Milestone changed from later to 0.7-stable
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

Fixed in [6e0fdedf].