url::short($url, $length = false, $base = false, $rep = '…')

Shortens a URL It removes http:// or https:// and uses str::short afterwards

  • $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 (string)
    The shortened URL