Mecha CMS

$u_r_l->query()

Return the URL query if any, otherwise return null.

2.2.0

$u_r_l->query(void);
$u_r_l->query(string $join = '&');
$u_r_l->query(string $join = '&', array $lot = []);

Example:

$url = new URL('https://mecha-cms.com/foo/bar?foo=bar&baz=qux');

$A = $url->query;
$B = $url->query();
$C = $url->query('&');
$D = $url->query(';', ['foo' => 1]);

Result:

$A = '?foo=bar&baz=qux';
$B = '?foo=bar&baz=qux';
$C = '?foo=bar&baz=qux';
$D = '?foo=1;baz=qux';

0 Comments

No comments yet.