You're currently specifying an itemid of 0, which means every user will upload
their submission to the same file.
I think it's helpful to visualise that files in the moodle filesystem are specified by a three part tuple -
component - 'mod_php- in your case,
and itemid (always 0)
So right now there's only the possibility of a single file per context due to the fact that both component and itemid being hardcoded, as you have discovered that leads to overwrites.
You will want to use a unique itemid per user to allow for many users to submit.
If users only ever submit once in a given context, that could be their userid, but if multiple submissions are possible within one context you will need some kind of unique submission id, which is usually tied to the id of some database
You will need to be able to retrieve whatever unique itemid you used for when you want to get the file later to operate on it or for redisplay.
In general, the component is pretty much always fixed, and you use a combination of context + itemid to allow for many unique files within that component's file area.