In this, you will get the current page URL in WordPress with a query or plain permalink.
// it will echo plain permalink without query stirngs
echo home_url( $wp->request );
//$wp->request includes the path part of the URL, eg. /path/to/page and home_url() outputs the URL in Settings > General, but you can append a path to it, so we're appending the request path to the home URL in this code.
//it will echo plain permalink with query stirngs
echo add_query_arg( $wp->query_vars, home_url( $wp->request ) );