When you upload a file thru a PHP script, PHP copies the uploaded file to a temporary directory with a unique filename, such as /var/tmp/phpxIayoM.
I assume it does this in case 2+ people uploaded the same filename at the same time.
The name of the file that was uploaded (on the client) is held in $HTTP_POST_FILES['userfile']['name'] or $userfile_name for PHP3