I also thought that the 2 scripts are exactly the same but thought that I was missing somehting that's why i didn't write it but i guess I'm not the only one that sees it this way.
So why the post???
What is the problem??
the answer to your given question is because they are the same