Like Sandeep Panda said, returning early will get invalid cases out of the way in the beginning of the execusion. It's a pattern that I follow constantly.
I would choose the second type, but with one small correction:
if(!$data) return false
set_option('name', 'programming');
set_option('age', '60');
set_option('creater', 'Ada');
Adding meaningful blank line will increase the code's readability. It will better distinguish the different logical parts of the code block.