You don't need parentheses around the entire ternary, just the conditional in the start.

You should also use the 4th parameter of `str_replace()` here, so that it doesn't do any errant string replacing elsewhere in the URL.

```php
str_replace("http", "https", $base, 1)
```