martinmdev/php-url

1.0.1 2019-09-25 02:40 UTC

This package is auto-updated.

Last update: 2024-10-25 14:30:19 UTC


README

codecov Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Usage

<?php

require __DIR__ . '/../vendor/autoload.php';

use Martinm\Url\Url;

$url = new Url('http://example.com/path/to/index.php?x=1&y=2');

$url->getScheme(); // 'http'
$url->getHost(); // 'example.com'
$url->getPort(); // null
$url->getPath(); // '/path/to/index.php'
$url->getQuery(); // 'x=1&y=2'

Installation

composer require martinmdev/php-url