Yup, it'd add the current date/time with no punctuation, such as print_r.20121005020936.txt
, where 20121005020936
is October 5th, 2012, 2:09:36am
, and place it in the same folder as the current file.
You could also just hard code the file name as `print_r.txt` or whatever you'd like and continue to overwrite it if you plan on checking in on the file each and every refresh.
Or use session_id() for a per-user basis:
'./print_r.' . session_id() . '.' . date( 'YmdHis' ) . '.txt',
print_r( $_SESSION, TRUE )
...but that would add up to a lot of files in a short amount of time if it's a popular site. On the other hand, overwriting would have you missing out on a lot of data as each hit would wipe the previous data.