PHPackages                             heartsentwined/url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. heartsentwined/url

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

heartsentwined/url
==================

A collection of url-related functions.

v2.0.4(9y ago)1510ISCPHPPHP &gt;=5.3.3

Since Sep 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/heartsentwined/php-url)[ Packagist](https://packagist.org/packages/heartsentwined/url)[ Docs](https://github.com/yalesov/php-url)[ RSS](/packages/heartsentwined-url/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

Yalesov\\Url
============

[](#yalesovurl)

[![Build Status](https://camo.githubusercontent.com/dfa7d8dc0bd47191400a0d79efc5e038cfdf4a6d9a77cbff61547fc82d03ea10/68747470733a2f2f7472617669732d63692e6f72672f79616c65736f762f7068702d75726c2e737667)](https://travis-ci.org/yalesov/php-url)

A collection of url-related functions.

Installation
============

[](#installation)

[Composer](http://getcomposer.org/):

```
{
  "require": {
    "yalesov/url": "2.*"
  }
}
```

Usage
=====

[](#usage)

Turn a URL, relative or absolute, into an absolute URL:

```
use Yalesov\Url\Url;
$url = Url::toAbsolute($baseUrl, $relativeUrl);
```

Filter out `.` and `..` segments from URL's path:

```
use Yalesov\Url\Url;
$path = Url::removeDotSegments($path);
```

Split a URL to its components: (reverse of `Url::join()`)

```
use Yalesov\Url\Url;
$parts = Url::split($url);
// one or more of the following keys may be present:
// $parts['scheme']   = (scheme, such as "http")
// $parts['host']     = (host name, IPv4, or IPv6 address)
// $parts['port']     = (the port number)
// $parts['user']     = (user name)
// $parts['pass']     = (user password)
// $parts['path']     = (path, e.g. a file path for "http")
// $parts['query']    = (the query)
// $parts['fragment'] = (the fragment)
```

Join together URL components to form a complete URL: (reverse of `Url::split()`)

```
use Yalesov\Url\Url;
$url = Url::join(array(
  'scheme'   => $scheme,
  'host'     => $host,
  'port'     => $port,
  'user'     => $user,
  'pass'     => $pass,
  'path'     => $path,
  'query'    => $query,
  'fragment' => $fragment,
));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~174 days

Recently: every ~0 days

Total

9

Last Release

3594d ago

Major Versions

1.0.3 → v2.0.02016-07-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2fd4399d9df9ec84c5064fc5b9fcdaa3e6edf9049882227efa46f24b40db67b?d=identicon)[heartsentwined](/maintainers/heartsentwined)

---

Top Contributors

[![yalesov](https://avatars.githubusercontent.com/u/20264293?v=4)](https://github.com/yalesov "yalesov (8 commits)")

---

Tags

url

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/heartsentwined-url/health.svg)

```
[![Health](https://phpackages.com/badges/heartsentwined-url/health.svg)](https://phpackages.com/packages/heartsentwined-url)
```

###  Alternatives

[spatie/url

Parse, build and manipulate URL's

73914.3M97](/packages/spatie-url)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[league/uri-components

URI components manipulation library

31932.3M66](/packages/league-uri-components)[sabre/uri

Functions for making sense out of URIs.

29335.2M40](/packages/sabre-uri)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15439.5M49](/packages/spomky-labs-base64url)[misd/linkify

Converts URLs and email addresses in text into HTML links

1122.9M10](/packages/misd-linkify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
