@ArturKlajnerok This is going to be faster and more concise using:
```php
foreach($results as &$val){
    if (isset($redirects[$val])) {
         $val = $redirects[$val];
    }
}
```

The current version calls count on $results on each iteration.