Get nid in views custom PHP argument
If you want to have the current NID of the viewed page in your view, you should use the following:

In your view:
At the Arguments section you select "Node:nid", in the configuration of this argument at "Action to take if argument is not present:" you can choose "Provide default argument" after that you choose "Node ID from URL".

And there you have your NID in your view.