Use old iPhone with no SIM for iMessage?

So I want to use my old iPhone for iMessage. It doesn't have a SIM but is there anyway I can add my number to the phone so I can receive and send iMessages?
Sorry if this is confusing I would just like to know.

Yes, you can send/receive iMessages. But it is done with your apple Id. Or you add another email.

IMessage doesn't use your sim, it only uses your apple ID. So you can just sign in with your apple id and it should work just fine.

Yes you can use it. But if you want to use a phone number as your ID then you need to make sure that you have used it on imessage before with a sim. Once you do that your number will permantanly be added to the Apple account on the phone. Now all you have to do is log in to your apple account through the old iphone and select it. But if you want to use an email then all you need to do is add it in setting throught the old phone