php8.5
Home/ Manual/ rfc3986 / uri/ Uri\Rfc3986\Uri::getRawScheme

Uri\Rfc3986\Uri::getRawScheme

PHP function Edit on GitHub ✎

(PHP 8 >= 8.5.0)

Retrieve the raw scheme component

Description

Uri\Rfc3986\Uri::getRawScheme(): string|null

Retrieves the raw (non-normalized) scheme component.

Parameters Parameters

Return Values

Returns the raw scheme component as a String if the scheme component exists, null is returned otherwise.

Examples

Uri\Rfc3986\Uri::getRawScheme basic example

php
<?php
$uri = new \Uri\Rfc3986\Uri("https://example.com");

echo $uri->getRawScheme();
?>

The above example will output:

output
https

See Also

  • Uri\Rfc3986\Uri::getScheme
  • Uri\Rfc3986\Uri::withScheme
  • Uri\WhatWg\Url::getScheme

Source: reference/uri/uri/rfc3986/uri/getrawscheme.xml · from the official PHP manual (php/doc-en)