Once you are a Permanent Resident, you can sponsor your spouse. But you can marry your partner whenever you want. Depending upon how you are getting your PR, it might be easier to marry ahead of time.
But, since you’re planning on marrying after you get your PR…
- If he gets a visa to visit Canada, you can marry him here. And you are correct: he has to return to Egypt before his visa expires unless you sponsor him “inland.”
- If you get married in a third country, it’s just like if you married him in Egypt – you will have to sponsor him “outland” unless he comes here with a visa in order for you to sponsor him “inland.”
Basically, where you get married doesn’t really affect the sponsorship application (except in translating the marriage certificate from a country where it is issued in a language other than English or French). What matters is where your spouse is when you sponsor him.