contao/import — Issue #3020: usage of stripos() instead of stristr() in Environment::agent()
Author: Toflar
Created: 2011-11-29 20:43:17+00:00
State: open
Labels: Feature, framework

Hi Leo

As far as I can see it from the code you only determine whether a certain keyword occurs in the user agent or not.
Why don't you use stripos()?

```
Note:
If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead.
```

Source: http://www.php.net/manual/en/function.strstr.php

That's what's recommended for the function strstr()/strpos() but I think it must apply for the case-insensitive stristr()/stripos() too =)

--- _Originally created on April 20th, 2011, at 02:39pm (ID 3020)_