Mecha CMS

$u_r_l->offsetGet()

Get normalized URL property.

2.2.0 \ArrayAccess

$u_r_l->offsetGet($key);

Example:

$url = new URL('https://mecha-cms.com/foo/bar/1');

$A = [$url->path, $url->i];
$B = [$url['path'], $url['i']];

Result:

$A = ['/foo/bar', '/1'];
$B = ['foo/bar', 1];