When you cast phase door, can you choose to hide inside it rather than passing through?
It is open to interpretation, but the possibility of being ejected makes me think perhaps you can. However, I don't like that interpretation as in theory you can then rest in it for as long as you like, as the duration is based on uses rather than time. (Yesterday a player in our group wanted to do that during a battle, until he had regenerated back all his hit points (troll) and cast a few combat buffs. At the time I ruled that he couldn't.)
This spell creates an ethereal passage through wooden, plaster, or stone walls, but not other materials. The phase door is invisible and inaccessible to all creatures except you, and only you can use the passage. You disappear when you enter the phase door and appear when you exit. If you desire, you can take one other creature (Medium or smaller) through the door. This counts as two uses of the door. The door does not allow light, sound, or spell effects through it, nor can you see through it without using it. Thus, the spell can provide an escape route, though certain creatures, such as phase spiders, can follow with ease. A gem of true seeing or similar magic reveals the presence of a phase door but does not allow its use.
A phase door is subject to dispel magic. If anyone is within the passage when it is dispelled, he is harmlessly ejected just as if he were inside a passwall effect.