How old is your child?
If he's still an infant below 6 mths, play yard maybe good, can use for longer time but that does not necessary mean he will like it in the play yard too.
Playpen if he's still about 6 mths he would out grow it sooon,
I think the best is to child proof your house and close all the doors of the room and let your child be.
Child proof one room means only toys, if there are electrical plugs place the cover over it. Windows and all locked. Put the mini gate to that room, leave the big door open and check on him once in a while. Must have sufficient toys to keep him occupied.
Can have different boxes of a few toys in each everyday just take out a new box.(inside one box have a few toys 3-4) then he won't get bored.