Senokot or Miralax- which is better?

I was recommended either one when I was in the ER for stomach pain a few months ago.

I see ALOT of posts about Miraax, but not many people talking about something like Senokot, which I feel helps me more.

Are they kind of the same, or no??