I feel like opening a portal to the sun would result in lots of highly pressurized, super-heated plasma shooting through and fucking annihilating everything in a massive area around the portal. I guess you could do it if you wanted to blow up, like, an entire building with a tiny and short-lived portal. Same thing in reverse when opening a portal into space.