understanding php for open read write