We can also use use:
```php
$text_w_links = preg_replace('/(?i)(http|https|ftp):\/\/\S*/', '<a href="$0" target="_blank">$0</a>', $escaped_text);
```
to make it caseless.