url::short
Shortens a URL It removes http:// or https:// and uses str::short afterwards
url::short($url, $length = false, $base = false, $rep = '…')
Parameters
- $url (string)
- The URL to be shortened
- $chars (int)
- The final number of characters the URL should have
- $base (boolean)
- True: only take the base of the URL.
- $rep (string)
- The element, which should be added if the string is too long. Ellipsis is the default.
Return values
- string
- The shortened URL